Setting up application logging

Learn about application logging in Cloudera Edge Management by learning supported logging output, log types, log retention policies, and logging configurations.

Application logging enables you to save application events. With this funtionality, you can analyze the application behavior and errors. Entries in log files contain essential information, including a timestamp, contextual information, and messages.

Logging output

You can configure the location for logging output through the logging.efm.location property in the efm.properties file. You can add one or more outputs separated by comma. Edge Flow Manager supports the following destinations for logging output:
  • Console output

    Application logs go to the standard output.

  • File output

    Application logs go to the defined file.

The default is to log the output to both file and console.

Log types

The log files are created under the logs directory in your Edge Flow Manager home library. You can change it through the logging.file.path property in the efm.properties file. Edge Flow Manager supports the following log types:
  • Application logs

    The file name for storing application logs is efm-app.log which is configurable through the logging.file.name property in the efm.properties file. The file tracks INFO level log lines by default. You can change it through the logging.level.com.cloudera.cem.efm property in the efm.properties file.

  • Access logs

    The file name for storing access logs is efm-access-{date}.log. The file tracks incoming requests to Edge Flow Manager.

Log retention policy

The default log retention policy is 30 days in the Edge Flow Manager. You can configure it through the logging.logback.rollingpolicy.maxHistory property in the efm.properties file.

The application logs are rolled by days and file size. You can configure it through the logging.logback.rollingpolicy.maxFileSize property in the efm.properties file.

If you want to configure the overall application log size, you can do it as well by setting the logging.logback.rollingpolicy.totalSizeCap property in the efm.properties file. The default setting is unlimited.

Logging configuration

The following list presents the overall logging configuration properties in Cloudera Edge Management:
  • logging.file.path

    Sets destination directory for application and access log files. Default is logs.

  • logging.file.name

    Sets file name of the application logs. Default is efm-app.log.

  • logging.efm.location

    Sets destination of the logs (comma separated values). Default is CONSOLE,FILE.

  • logging.logback.rollingpolicy.maxFileSize

    Sets maximum file size of the logs. Default is 10MB. The log file is rolled if it reaches that size.

  • logging.logback.rollingpolicy.maxHistory

    Sets the number of days you want to keep the log files for. Default is 30 days.

  • logging.logback.rollingpolicy.totalSizeCap

    Optional property. Sets the total size of the log files. By default, the Edge Flow Manager keeps all log files for the specified days defined in the logging.logback.rollingpolicy.maxHistory property.

  • logging.level.com.cloudera.cem.efm

    Sets the log level severity. By default, the log file contains INFO, WARN, and ERROR logs only. For debugging, you can enable the DEBUG or TRACE level. Possible values for this property are: TRACE, DEBUG, INFO, WARN, ERROR.