Change logging configuration for process- and host-controller in an EAP6 domain

Solution Verified - Updated -

Environment

  • JBoss Enterprise Application Platform (EAP)
    • 6.x

Issue

  • there is no logging configuration in the domain.xml for the host-controller, is it possible to change the logging for DC or HC?
  • the domain/log/host-controller.log will be overwritten if the domain/host controller is restarted, is it possible to keep the former logging output?
  • is it possible to have different logging configurations for the host-, process-controller and the server boot.log files?
  • Server logs overwritten on EAP restarts (Domain Mode)

Resolution

The domain/server/SERVERNAME/log/boot.log, domain/log/host-controller.log and domain/log/process-controller.log are controlled by the domain/configuration/logging.properties.

At the moment it is not possible to have different logging configurations for the process-controller, host-controller or the server boot logging.

keep old content and append to the logfile after restart

To prevent the logfiles from being overwritten if the DC and HC are restarted, make the following configuration changes to the handler configuration:
Change the default file handler within the domain/configuration/logging.properties as followed:

# File handler configuration
handler.FILE=org.jboss.logmanager.handlers.FileHandler
handler.FILE.level=TRACE
handler.FILE.properties=autoFlush,append,fileName
handler.FILE.autoFlush=true
handler.FILE.append=true
handler.FILE.fileName=${org.jboss.boot.log.file:boot.log}
handler.FILE.formatter=PATTERN

NOTE:

  • The key changes to the configuration are
    handler.FILE.properties=autoFlush,append,fileName
    handler.FILE.append=true

If this configuration is changed the logging for process-controller, host-controller and all server/boot.log files will be changed too.

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments