All I want to do is append the current date and time to my log file, say:
\"export_(Wed_Feb_21_2009_at_1_36_41PM)\"
Here is my current conf
If you want to use a .log suffix (to generate a file like myLogPrefix.20160309.log) use:
The gotchas are the staticLogFileName = false
which allows you to generate rollups on the fly (instead of having to restart the service\server) and the awkward 'g'
in the datepattern
since g
is a magic character in datePattern
. There isn't good documentation on the log4net site to study this, so it's really wisdom gained from trial and error and scouring other people's experiences.