logger module : Question about log message format
jorma kala
jjkk73 at gmail.com
Fri Sep 4 07:34:32 EDT 2009
Hi,
I've created a logger like this:
LOG_FILENAME = 'test.txt'
fh=logging.FileHandler(LOG_FILENAME,'w')
logger1 = logging.getLogger('myLogger1')
logger1.addHandler(fh)
logger1.setLevel(logging.INFO)
logger1.info('message from logger1')
and was hoping to get log messages in this format in my log file:
:INFO:myLogger1:message from logger1
instead I just get a plain message like this:
message from logger1
Do you know why?
Many thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20090904/772d949b/attachment.html>
More information about the Python-list
mailing list