Logging

log4j

The RapidDeploy framework, agent and orchestration services all use log4j as the logging framework.

RapidDeploy supports a number of logging levels and are listed as follows from most severe to least severe. When a logging level is set, all the levels above that level are active. Therefore setting INFO will mean all Warning, Error and Fatal conditions are reported.

  • FATAL - The FATAL level designates very severe error events that will lead the application to abort. For example a FATAL error on a RapidDeploy deployment job indicates that the job has failed.
  • ERROR - The ERROR level designates error events that might still allow the application to continue running. For example an ERROR level log entry on a RapidDeploy deployment job indicates that the individual task has failed. This may result in the entire job failing if the task is set to failOnError, otherwise the task will be marked as a fail but the job will continue to the next task.
  • WARN - The WARN level designates potentially harmful situations.
  • INFO - The INFO level designates informational messages that highlight the progress of the application at coarse-grained level. These messages are part of normal log output.
  • DEBUG - The DEBUG Level designates fine-grained informational events that are most useful to debug an application. This level is likely to be set to "on" for deployments. These messages are part of normal log output.

Project level logging

Each RapidDeploy project can have, in its root directory, a log4j.properties file. Here you may set the logging levels for the orchestration jobs that the project runs. This file is created by default when the project is created through the RapidDeploy interface. You should understand how log4j loggers work before amending this file.

If you examine this file you'll see that the root logger is INFO, so the general logging level will be Informational messages and above.

        log4j.rootLogger=INFO, commandline

Therefore, by default the logging level is set to INFO for all third party products.

Log4j allows setting fine grained logging on a package hierarchy. So in the default file you can see the following line:

        log4j.category.com.midvision.rapiddeploy.orchestration.tasks=DEBUG

This means all classes in packages at com.midvision.rapiddeploy.orchestration.tasks and below will output DEBUG messages.

You may amend these log levels or add new ones to suit the level of logging you require. Typically however, the default settings are sufficient for most projects.

Further reading