tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Petras (JIRA)" <>
Subject [jira] [Created] (TOMEE-1856) Empty log files from AsyncConsoleHandler
Date Sat, 02 Jul 2016 13:29:10 GMT
Petras created TOMEE-1856:

             Summary: Empty log files from AsyncConsoleHandler
                 Key: TOMEE-1856
             Project: TomEE
          Issue Type: Bug
          Components: TomEE Core Server
    Affects Versions: 7.0.1
            Reporter: Petras
            Priority: Minor

{{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_
{{ = $\{catalina.base}/logs}}

This message was sent by Atlassian JIRA

View raw message