On 10-1-2010 20:04, Joan Miller wrote:
How the logging '%(asctime)s' [1] specifier to gets the millisecond
portion of the time if there is not a directive to get it from the
time module [2] ?
"The date format string follows the requirements of strftime()"
[1] http://docs.python.org/library/logging.html#basic-example
[2] http://docs.python.org/library/time.html#time.strftime
It appends them to the string that strftime() returned.
If you set a custom datefmt, it will stop doing this and you'll have to
use %(msecs) in your log format to get them back.
See the source, Lib/logging/__init__.py around line 400. (Python 2.6.4)
-irmen
--
http://mail.python.org/mailman/listinfo/python-list