logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tony....@sanlam.co.za
Subject Re: Multiple logs
Date Fri, 03 Dec 2004 13:59:34 GMT
Hi David

You can use the "Pattern Layout" "Conversion Character" "t" (lower-case).
According to the documentation it will output the thread name (if 
available) or alternatively the thread number.

So your config might look similar to  the following :

                <appender name="Console" 
                        <layout type="log4net.Layout.PatternLayout">
                                <conversionPattern value="%p %t %c - %m%n" 

See the documentation on the PatternLayout Class for more Conversion 


Regards, Tony

"GROSPELIER David" <dgrospelier@sword-group.com>
03/12/2004 12:58
Please respond to "Log4NET User"

        To:     <log4net-user@logging.apache.org>
        Subject:        Multiple logs

I want to generate a log file for every thread in my application. My 
application is multithread and I want to know which thread does which 
Today, I've only one log file but the log entries are mixed and can't find 
which thread is concerned?
Any help is appreciated!
David Grospelier
Chef de projets
Sword - www.sword.fr

Any views expressed in this message are those of the individual sender, 
and Sanlam accepts no liability for such views, except where the sender 
specifically states them to be those of Sanlam.
Sanlam Life Insurance Limited is a Licensed Financial Services Provider.
Enige sienswyses of stellings wat in hierdie boodskap uitgedruk word is 
dié van die individuele afsender, en Sanlam aanvaar geen aanspreeklikheid 
daarvoor nie, behalwe waar die afsender uitdruklik vermeld dat dit dié van 
Sanlam is.
Sanlam Lewensversekering Beperk is 'n Gelisensieerde Verskaffer van 
Finansiële Dienste.

View raw message