Logging

This connector provides logging support using the Logback logging framework using Spring configuration properties. Logback provides advanced logging features such as auto rollover by size or date, archiving, log export to common logging services, and log levels.

Configuring the Logback

If you require Logback configuration beyond what is available using Spring configuration properties, you can run your connector with a logback-spring.xml file. For information about using the logback, see the following links:

The main difference to what Spring Boot provides is that this connector provides its own alternative logback configuration files that can be included into your logback-spring.xml file.

You can include the following new files that are found at com/solace/connector/core/logging/logback/ into your logback-spring.xml file:

defaults.xml

The defaults.xml file provides conversion rules, pattern properties, and common logger configurations.

Solace recommends that you always include the defaults.xml file in your logback-spring.xml file because it includes a %sanitize <conversionRule> that is applied to the default CONSOLE_LOG_PATTERN and FILE_LOG_PATTERN. This conversion rule does some filtering to obfuscate potentially sensitive data from the logs.

console-appender.xml
The console-appender.xml file adds a ConsoleAppender using the CONSOLE_LOG_PATTERN.
file-appender.xml
The file-appender.xml file adds a RollingFileAppender using the FILE_LOG_PATTERN and ROLLING_FILE_NAME_PATTERN with appropriate settings.

In addition to the above new files that you can include in your logback-spring.xml file, this connector supports the same logging options that Spring Boot supports.

For more information and examples, see the Spring Configure Logback for Logging section.