Hi,

I need to rotate or backup the current log file on startup but can't work 
out how to do it.

I have a typical log config:

appenders:
    - type: console
      threshold: INFO
    - type: file
      threshold: DEBUG
      logFormat: "%-6level [%d{HH:mm:ss.SSS}] [%t] %logger{5} - %X{code} 
%msg %n"
      currentLogFilename: /var/log/dw-service.log
      archive: true
      archivedLogFilenamePattern: 
/var/log/tmp/dw-service-%d{yyyy-MM-dd}-%i.log.gz
      archivedFileCount: 3
      timeZone: UTC
      maxFileSize: 10MB


Ideally I would like to cause an archive of the logfile immediately on 
startup but failing that, I would settle for getting a handle to the 
appender and copying the file. 

I can't work out how to do either. Please could somebody offer any help?

Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"dropwizard-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dropwizard-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to