Log4net: moving a file by utc date, not server date

Is there a way to make roll4net roll over a file at utc time, and not at server time? Right now my file stores logs in utc. But he turned over, i.e. Creates a new file for every day on the server. The server is in Pacific time, so what happens is that yesterday's file has the first 8 hours of logs from the current file.

eg. The November-10 file has logs until 07:59:59 AM on November 11th.

How to make log4net roll over file depending on utc time?

+3
source share
1 answer

Extend one of the existing Appenders and override the code that performs the re-enable. It should not be too complicated.

0

Source: https://habr.com/ru/post/1774450/


All Articles