we have a GF4 server that produces a lot of logs. Currently it is setup like this:
com.sun.enterprise.server.logging.GFFileHandler.excludeFields <>
com.sun.enterprise.server.logging.GFFileHandler.file <${com.sun.aas.instanceRoot}/logs/server.log>
com.sun.enterprise.server.logging.GFFileHandler.flushFrequency <1>
com.sun.enterprise.server.logging.GFFileHandler.formatter <com.sun.enterprise.server.logging.ODLLogFormatter>
com.sun.enterprise.server.logging.GFFileHandler.logtoConsole <false>
com.sun.enterprise.server.logging.GFFileHandler.maxHistoryFiles <25>
com.sun.enterprise.server.logging.GFFileHandler.multiLineMode <true>
com.sun.enterprise.server.logging.GFFileHandler.retainErrorsStasticsForHours <0>
com.sun.enterprise.server.logging.GFFileHandler.rotationLimitInBytes <104857600>
com.sun.enterprise.server.logging.GFFileHandler.rotationOnDateChange <true>
com.sun.enterprise.server.logging.GFFileHandler.rotationTimelimitInMinutes <0>
handlerServices <com.sun.enterprise.server.logging.GFFileHandler>
This is working fine. But we would like to keep everything that gets logged to System.err for a longer time.
- Is there a possibility to log everything to server.log and additionally everything in System.err to another file?
- Is there a possibility to hook into the rotation to do something after the file rotated (e.g. filter the file).