Uploaded image for project: 'TomEE'
  1. TomEE
  2. TOMEE-1856

Empty log files from AsyncConsoleHandler

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 7.0.1
    • 7.0.2
    • TomEE Core Server
    • 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

      Attachments

        Activity

          People

            romain.manni-bucau Romain Manni-Bucau
            abyss Petras
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: