Custom filename in a rolling Log4Net logfile?

Posted by Brett Rigby on Stack Overflow See other posts from Stack Overflow or by Brett Rigby
Published on 2009-06-23T07:29:19Z Indexed on 2010/03/22 20:11 UTC
Read the original article Hit count: 481

Filed under:
|

Hello

We have a ASP .Net application whereby we use Log4Net to log details within the app - nothing new there - and the rolling log filenames are in the usual format of:

rolling-log.txt 
rolling-log.txt.1
rolling-log.txt.2 etc.

A each user of the application adds to the logfile, the logfile can be difficult to read for a specific user's case and so, we'd like to modify the config file somehow to record the user's log details individually, each writing to a specific file, e.g.

<applicationId>rolling-log.txt
<applicationId>rolling-log.txt.1
<applicationId>rolling-log.txt.2
etc.

where is each user's unique application Id, made up of a five digit number, e.g.

12345rolling-log.txt

Any ideas on the best way to implement this, assuming that it's possible?

Cheers

Brett

© Stack Overflow or respective owner

Related posts about log4net

Related posts about ASP.NET