Hi,

One approach to this issue is to takes advantage of Log4net's
Thread.Context.Properties

For example 
log4net.ThreadContext.Properties["UserName"] = UserName
                   
And then use the PatternLayout:
  <layout type="log4net.Layout.PatternLayout">
     <conversionPattern value="%thread User=%property{UserName}"/>
  </layout>

I have written a short article about this method on:
www.l4ndash.com/Articles/Trackingusersessionsinlog4net/tabid/59/Default.aspx

Georg
L4NDash - Log4Net Dashboard www.l4ndash.com


-----Original Message-----
From: Johnny [mailto:[EMAIL PROTECTED] 
Sent: 23. september 2005 11:08
To: 'Log4NET User'
Subject: how can i add my custom infomaition

Hi,
        When I using log4net's AdoAppender,I have a problem, because the
log4net framework default provide logger,logtime,logLevel,message,etc,but I
want to adds extra information like the username, department, etc.so what
can I do? I don't know how to implement it .can you help me ? thanks very
much.



Reply via email to