Python Logging: Specifying converter attribute of a log formatter in config file
Vinay Sajip
vinay_sajip at yahoo.co.uk
Sun Sep 16 04:07:31 EDT 2012
On Thursday, August 30, 2012 11:38:27 AM UTC+1, Radha Krishna Srimanthula wrote:
>
> Now, how do I specify the converter attribute (time.gmtime) in the above section?
Sadly, there is no way of doing this using the configuration file, other than having e.g. a
class UTCFormatter(logging.Formatter):
converter = time.gmtime
and then using a UTCFormatter in the configuration.
More information about the Python-list
mailing list