Title says it all, I need to log two strings in one line.
For example, something like this:
logging.info(string1,string2)
Thank you :)
The logging functions act like this:
result = arg1 % (arg2, arg3, ...)
What you have will try to format the first string with the second string:
result = string1 % string2
Either manually specify a formatting string:
logging.info('%s %s', string1, string2)
Or join them together into one string:
logging.info(' '.join([string1, string2]))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With