Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
7.0.1
-
None
Description
org.apache.tomee.jul.formatter.AsyncConsoleHandler instantiation triggers creation of empty log files, prefixed with "juli." (ex. juli.2016-07-02.log) in {currentDir}/logs/, where {currentDir} is folder from which TomEE was started. Please note, not in ${catalina.base}/logs folder. As this handler is meant for logging to the console, it is not supposed to create any log files, is it?
The issue is that this class indirectly extends org.apache.juli.FileHandler, which constructor invokes FileHandler#openWriter method creating log file for writing. If directory is not supplied via constructor parameters it creates logs/ folder within current folder and new file to for output log. The fix would be to override this method with empty body.
The only workaround is to specify location of this empty file in TomEE logging.properties ex.:
org.apache.tomee.jul.formatter.AsyncConsoleHandler.directory = ${catalina.base}/logs