How add class name to format of the logging module?

Vinay Sajip vinay_sajip at yahoo.co.uk
Wed Oct 12 18:03:53 EDT 2011


On Oct 12, 9:42 pm, Peng Yu <pengyu... at gmail.com> wrote:
> Hi,
>
> The following attributes does not include the class name. Is there a
> way to add class name to the format string? Thanks!

Not in the general case without a reasonable run-time cost. Since you
can find the exact line number a logging call was made from, you can
always figure out the class.

Regards,

Vinay Sajip



More information about the Python-list mailing list