lraulea commented on issue #234:
URL: 
https://github.com/apache/logging-log4net/issues/234#issuecomment-2764595977

   @FreeAndNil Just to conclude the day with good news.
   
   ```
   protected override void AdjustFileBeforeAppend()
   {
       var currentFile = File;
       base.AdjustFileBeforeAppend();
       if (!currentFile.Equals(File))
       {
           //log currentFile, File params to logfile3        
           //logfile3 contains entries from rollover-on-size, and the 
rollover-on-date
           //I can async zip currentFile here
       }
   }
   ```
   
   Use-case 1: process is running
   
   The above override of AdjustFileBeforeAppend() works actually just fine 
during my latest tests. Sorry for the confusion. I thought I've seen few times 
that the zip was not done, but I cannot reproduce the issue, I have to look 
further here.
   
   Use-case 2: process (app) is restarted after the top-of-the-hour
   
   A log file has been created, the app has been closed, after the rollover 
date moment the app is restarted. The AdjustFileBeforeAppend() has currentFile 
equal to File (!). Consequence of this is that the file created in previous 
instance, is left unzipped. @FreeAndNil any thoughts how I can use log4net to 
zip files between instances of the same process?
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@logging.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to