logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From azure_ss <seven...@gmail.com>
Subject Re: log file for each session
Date Fri, 28 Jul 2006 14:23:04 GMT

Ron,

I was considering two solutions the other days:
1. Create a new appender which can dispatch the log based on the sessionid
as I need.
2.  use the patternstring for the log filename, reload the configuration
file on each request
I tried the second one and it seems there some memory leak issue.
I am glad that the PatternFileAppender is already there. The thing left is
to check if it's threadsafe.
The new request you created would be really helpful and I am looking forward
to it.

Thanks.

Victor


Ron Grabowski wrote:
> 
> This post explains how to configure log4net to use a pattern for the
> File property of an appender that writes to a file.
> 
> http://tinyurl.com/p67at
> http://www.mail-archive.com/log4net-user%40logging.apache.org/msg03269.html
> 
> I created an issue and checked in some initial code for log4net to
> support accessing certain ASP.Net items:
> 
>  https://issues.apache.org/jira/browse/LOG4NET-87
> 
> Eventually, you'll be able to do something like this:
> 
>  <file value="%aspnet-session{sessionId}.log" />
> 
> Is this an ok naming convention?
> 
>  %aspnet-session{contents:key=ProductId}
>  %aspnet-session{contents:count}
>  %aspnet-session{sessionId}
>  %aspnet-request{items:key=ProductId}
>  %aspnet-request{queryString:key=ProductId}
>  %aspnet-request{queryString:count} 
> 
> --- azure_ss <seven.su@gmail.com> wrote:
> 
>> 
>> I am learning log4net and want to know how can I config it to create
>> log file
>> for each web session. say the log file name would be
>> log{sessionid}.log
>> 
>> Can someone give some example?
>> Thanks
>> 
>> Victor
>> -- 
>> View this message in context:
>>
> http://www.nabble.com/log-file-for-each-session-tf2005101.html#a5507552
>> Sent from the Log4net - Users forum at Nabble.com.
>> 
>> 
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/log-file-for-each-session-tf2005101.html#a5540588
Sent from the Log4net - Users forum at Nabble.com.


Mime
View raw message