logback-spring-file.xml

File purpose

The logback-spring-file.xml file defines the logback configuration for the MR application in production.

File location

The file is located in the folder mr-application\src\main\resources.

File values

note

The logback-spring-file.xml file uses Logback configuration. See the official Logback documentation for details about Logback concepts: https://logback.qos.ch/documentation.html

The file has the following attributes:

Element Attribute Value Description
<configuration> debug true Flag used to enable/disable Logback debug mode
<shutdownHook class ch.qos.logback.core.hook.DelayingShutdownHook Install a JVM shutdown hook to shut down logback and release associated resources.
<jmxConfigurator/> Allows the configuration of logback via JMX
<conversionRule> conversionWord thread Configuration of a custom converter to retrieve the current thread generating the log
converterClass com.activeviam.apm.logging.impl.APMThreadConverter Configuration of a custom converter to retrieve the current thread generating the log
<conversionRule> conversionWord user Configuration of a custom converter to retrieve the current user generating the log
converterClass com.activeviam.apm.logging.impl.APMUserConverter
<conversionRule> conversionWord instance Configuration of custom converter to retrieve the instance name of the application
converterClass com.activeviam.apm.logging.impl.APMInstanceConverter
<timestamp> key startupDateTime Indicates that a timestamp will be generated at configuration parsing time
datePattern yyyyMMdd-HHmmss Pattern of the generated timestamp
<property> name logDirRootPath Name of the property used to define the folder in which the logs will be printed out
value ${LOG_PATH:-.}/logs} Value of that property
<property> name logFileNamePrefix Name of property used to define the prefix of the log files
value mr-application_${startupDateTime}_%i-startup_ Value of that property
<property> name logFileNameRollingTag Name of the property used to define the tag used in the rolled logs
value %d{yyyyMMdd}-period Value of that property
<property> name logFileNameExt Name of the property used to define the exension of the generated log files
value .log.zip Value of that property
<property> name logFileRollingMaxHistory Name of the property used to define the maximum number of rolled-over files to keep
value 30 Value of that property
<property> name logFileRollingMaxFileSize Name of the property used to define the maximum size of a log file
value 200GB Value of that property
<property> name logPattern Name of the property used to define the layout of the logs
value %n%date{yyyy-MM-dd HH:mm:ss.SSS z} %relative [%thread] %logger%n%level: %message%n%throwable Value of that property
<appender> name JSON Appender used to output JSON logs
class ch.qos.logback.core.rolling.RollingFileAppender Rolling file appender
<file> ${custom.json.log.dir}/activepivot.log The name of the file to write to
<rollingPolicy> class ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy Rolls over files primarily by date, but also limits the size of each log file
<fileNamePattern> ${logDirRootPath}/${logFileNamePrefix}main_${logFileNameRollingTag}${logFileNameExt} Name of the rolled-over log files
<maxHistory> ${logFileRollingMaxHistory} Controls the maximum number of rolled-over files to keep
<maxFileSize> ${logFileRollingMaxFileSize} Controls the maximum size of rolled-over files
<cleanHistoryOnStart> true If set to true, roll over removal will be executed on appender start-up
<encoder> class net.logstash.logback.encoder.LogstashEncoder The encoder class used to transform an event into an output stream
<timestampPattern> [UNIX_TIMESTAMP_AS_NUMBER] Writes the timestamp value as a numeric unix timestamp
<excludeMdcKeyName> user_name Excludes that field from the Mapped Diagnostic Context (MDC)
<excludeMdcKeyName> thread_name Excludes that field from the Mapped Diagnostic Context (MDC)
<fieldNames>
<timestamp> log_timestamp Defines the name of the timestamp field
<thread> [ignore] Prevents the thread field from being output by setting the field name to [ignore]
<provider> class net.logstash.logback.composite.loggingevent.LoggingEventPatternJsonProvider Class that provides support for JSON outputs
<pattern> {
"user_name": "%user",
"thread_name": "%thread",
"instance_name": "%instance"
}
Adds that JSON pattern to the logs
<appender> name MAIN Appender used to output main logs
<class> class ch.qos.logback.core.rolling.RollingFileAppender Rolling file appender
<rollingPolicy> class ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy Rolls over files primarily by date, but also limits the size of each log file
<fileNamePattern> ${logDirRootPath}/${logFileNamePrefix}main_${logFileNameRollingTag}${logFileNameExt} Name of the rolled-over log files
<maxHistory> ${logFileRollingMaxHistory} Controls the maximum number of rolled-over files to keep
<maxFileSize> ${logFileRollingMaxFileSize} Controls the maximum size of rolled-over files
<encoder>
<pattern> ${logPattern} Pattern used for the log output
<appender> name QUERIES Appender used to output logs specific to queries
<class> class ch.qos.logback.core.rolling.RollingFileAppender Rolling file appender
<rollingPolicy> class ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy Rolls over files primarily by date, but also limits the size of each log file
<fileNamePattern> ${logDirRootPath}/${logFileNamePrefix}queries_${logFileNameRollingTag}${logFileNameExt} Name of the rolled-over log files
<maxHistory> ${logFileRollingMaxHistory} Controls the maximum number of rolled-over files to keep
<maxFileSize> ${logFileRollingMaxFileSize} Controls the maximum size of rolled-over files
<encoder>
<pattern> ${logPattern} Pattern used for the log output
<logger> name com.quartetfs.biz.pivot.monitoring.impl.XmlaMonitorListener The logger for the class used to output the current time and size of the XMLA response
level INFO The level of printed out logs for that logger
<logger> name com.quartetfs.biz.pivot.webservices The logger for the core ActivePivot webservices package
level INFO The level of printed out logs for that logger
<logger> name com.quartetfs.biz.pivot.streaming The logger for the core ActivePivot streaming package
level INFO The level of printed out logs for that logger
<logger> name com.quartetfs.tech.streaming Logging for ActivePivot streams (stateful components publishing events to a publisher)
level INFO The level of printed out logs for that logger
<logger> name com.qfs.pivot.rest.discovery The logger for the ActivePivot discovery service
level INFO The level of printed out logs for that logger
<logger> name com.qfs.pivot.rest.query The logger for the ActivePivot queries service
level INFO The level of printed out logs for that logger
<logger> name com.qfs.pivot.websocket The logger for ActivePivot websockets
level INFO The level of printed out logs for that logger
<logger> name com.quartetfs.pivot.mdx The logger for the MDX engine
level INFO The level of printed out logs for that logger
<logger> name com.quartetfs.biz.pivot.impl.TimerActivePivotQueryExecutor A simple query executor that times each query that goes through it, and logs the timings at the Level.INFO
level INFO The level of printed out logs for that logger
<logger> name com.quartetfs.biz.pivot.impl.ActivePivotVersion The logger for the ActivePivot version instance
level INFO The level of printed out logs for that logger
<logger> name com.quartetfs.biz.pivot.query.aggregates The logger for the retrieval of aggregated values
level INFO The level of printed out logs for that logger
<logger> name com.quartetfs.biz.pivot.postprocessing The logger for ActivePivot post-processors
level INFO The level of printed out logs for that logger
<logger> name org.springframework.http The logger for the Spring package that contains a basic abstraction over client/server-side HTTP.
level INFO The level of printed out logs for that logger
<logger> name org.springframework.remoting The logger for the exception hierarchy for Spring’s remoting infrastructure, independent of any specific remote method invocation system.
<root> level INFO Root logger level
<appender-ref> ref STDOUT The name of the Logback appender used by the root logger
<contextListener> class ch.qos.logback.classic.jul.LevelChangePropagator Implementation of Logback context listener
<resetJUL> true Flag used to reset all previous level configurations of all j.u.l. loggers