Logging additional content #161
-
I'm trying to log additional messages to my log file other than the default ones set out in the pycomm3 module. Here's a code example:
This is the contents of the log file after running function
Where am I going wrong? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
You're not, that function is only configuring the |
Beta Was this translation helpful? Give feedback.
You're not, that function is only configuring the
pycomm3
logger where as you're using the root logger. I didn't even think about custom loggers when I added that function, so I just did. If you update to the latest release (1.2.1), you can pass in the name of the logger you also want to configure along with the pycomm3 one. In your case where you're using the root logger, just pass in an empty string (e.g.configure_default_logger(level=LOG_VERBOSE, filename='./logging.log', logger='')
. Hope that works for you.