Managing loggers

You can add loggers to the root log and set their logging level to keep track of errors and some activities.

About this task

Starting with version 7.2.3.0, HCL DevOps Deploy (Deploy) uses Apache Log4j version 2.x (Log4j2) to manage system logs. Loggers track system events, errors, and diagnostic activities, outputting information into the server's primary log file (deployserver.out).

For more information about customizing the Log4j2 output, see Log4j2 Configuration.

You can manage the logging settings of the server from the web UI or by editing the <DEPLOY_SERVER_HOME>/appdata/conf/server/log4j2.xml file.
Note: Editing the log4j2.xml file directly is recommended only for debugging purposes or when the web UI is inaccessible. Any changes made to the log4j2.xml file may be overwritten by changes applied through the web UI, CLI commands, or during a server version upgrade. For persistent logging configuration, use the web UI or CLI.

You can manage the agent log settings by editing the <DEPLOY_AGENT_HOME>/conf/log4j2.xml file and the agent relay log settings by editing the <DEPLOY_AGENTRELAY_HOME>/conf/log4j2.xml file.

Procedure

  1. Open the Logging page by clicking Settings > System > Logging.
    Loggers are listed in hierarchical order. The first one is the root logger, which is indicated by an * in the UI. It typically has no name in the logging library. The other default loggers and log classes are as follows:
    com.sun.jersey.server.impl.application.WebApplicationImpl
    com.sun.jersey.spi.container.ContainerResponse
    com.urbancode.air.diagnostics
    com.urbancode.air.vc
    com.urbancode.container.tomcat
    com.urbancode.ds
    com.urbancode.encryption.keystore
    net.schmizz
    org.apache.tomcat
    org.hibernate.cache.ReadWriteCache
    org.hibernate.engine.jdbc.spi.SqlExceptionHelper
    org.hibernate.orm.deprecation
    com.urbancode.ds.cleanup
    Each logger has a level drop-down that allows you to change the logging level. The following log level types are available:
    • ALL
    • TRACE
    • DEBUG
    • INFO
    • WARN
    • ERROR
    • FATAL
    • OFF
  2. To edit multiple loggers simultaneously, select the loggers from the selection column, click Bulk Actions, set the level as required, and save your changes.
  3. To add a logger, click Add Logger, specify the logger name, it's logging level, and confirm your changes.
  4. To delete a custom logger use the actions column or to delete multiple loggers, use Bulk Actions. The root and default loggers cannot be deleted. Removing a logger reverts the logger to the logging level defined by its superior in the hierarchy.