开发者

Log4net : Rolling file on utc date rather than server date

Is there a way to make log4net roll over the file on utc time rather than server time? Right now my file stores logs in utc time. But it rolls over, i.e. creates a new file for each day on server time. The server is on Pacific time, so what happens is that yesterdays file has the first 8 hours of logs from todays file.

E.g. File for Nov-10 has logs until 07:59:59 am of Nov-11.

How do I make log4net roll over the file depending up开发者_Go百科on utc time?


Extend one of the existing Appenders and reimplement the code that does the reolling over. Shouldn't be too hard.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜