I am using python\'s log formatter to format log records and i have a fmt value of
fmt = \"[%(filename)s:%(lineno)s] %(message)s\"
What i w
Option 1
Start here: http://docs.python.org/library/logging.html#formatter-objects
You'll create your own customized subclass of Formatter
that provides it's own unique format
method.
Then you must be sure to call setFormatter()
in each of your Handlers
so that they use your new formatter.
Option 2
Create your own subclass of LogRecord with the additional property.
Subclass Logger
and override makeRecord
to create your new subclass of LogRecord
.
Provide a customized format that uses this new property value.