Application Logging

Logging within Unified Assurance is an extremely important way to monitor the application as well as troubleshoot and debug the various actions completed by the applications. There are six logging levels built into the Unified Assurance applications:

The default logging level for most applications is ERROR.

The logging levels recognized by the Message function (which is used within the application logic and rules files) are DEBUG, INFO, WARN, ERROR, FATAL and ALWAYS.

Changing the Logging Level

  1. Change the logging level to DEBUG for the application. All applications have an application configuration that controls the logging level that is used.

    1. Navigate to the Jobs or Services UI.

    2. Find and select the application that is used by the application.

    3. Change the LogLevel option to DEBUG and click Submit.

  2. Restart the application to start using the new logging level, or use the Reload Config functionality.

  3. Analyze the log files to determine where the error is occurring.

  4. Modify the rules to fix the issue.

  5. Repeat Step 1, changing the logging level back to ERROR.

  6. Restart the application to start using the new logging level, or use the Reload Config functionality.

Logging Examples

Below are examples of how to utilize the logging function within an Unified Assurance rules file.

Single Line Example

$Log->Message("DEBUG", "Show a variable - " . $SomeVariable);

Multi-Line Example

$Log->Message('DEBUG', [
    '#===============================================',
    '# Log Line1',
    '# Log Line2',
    '# Show variable 1 - ' . $SomeVariable1,
    '# Show variable 2 - ' . $SomeVariable2,
    '#==============================================='
]);