Re: Logging: Formatter: name of the function

2005-12-23 Thread Sylvain Defresne
Le vendredi 23 décembre 2005 à 16:23 +0100, Gregor Horvath a écrit : > Hi, > > Is there a possibility to format a log message to give the function name > where the log appears? > > Example > > import logging > > def aTestFunction(): >logger.debug("This is a message") > > The log should re

Re: Logging: Formatter: name of the function

2005-12-23 Thread Bengt Richter
On Fri, 23 Dec 2005 16:23:57 +0100, Gregor Horvath <[EMAIL PROTECTED]> wrote: >Hi, > >Is there a possibility to format a log message to give the function name >where the log appears? > >Example > >import logging > >def aTestFunction(): > logger.debug("This is a message") > >The log should read:

Logging: Formatter: name of the function

2005-12-23 Thread Gregor Horvath
Hi, Is there a possibility to format a log message to give the function name where the log appears? Example import logging def aTestFunction(): logger.debug("This is a message") The log should read: aTestFunction This is a message. There is a possibilty to format the module namewith %(m