Logging Service

The Logging Service DSL is a wrapper for the Logging Service module provided by CSW. You can refer to the detailed documentation of Logging Service provided by CSW here.

The CSW documentation explains all the supported logging related configurations for example, default log level, component specific log levels, log appender etc. It also explains how to override default values.

All Sequencer scripts are expected to be kept inside the sequencer-scripts repo under Subsystem specific directories. Read more about adding new scripts and script specific configuration files here.

The default log level for sequencers can be set using command line options. See the SequencerApp documentation for more information.

The Logging Service DSL exposes following APIs to script writers for logging at different levels:

trace

Kotlin
trace(message = "logging at trace level")

trace(message = "logging at trace level",
        extraInfo = mapOf("key1" to "value1", "key2" to "value2"))

debug

Kotlin
debug(message = "logging at debug level")

debug(message = "logging at debug level",
        extraInfo = mapOf("key1" to "value1", "key2" to "value2"))

info

Kotlin
info(message = "logging at info level")

info(message = "logging at info level",
        extraInfo = mapOf("key1" to "value1", "key2" to "value2"))

warn

Kotlin
warn(message = "logging at warn level")

warn(message = "logging at warn level", cause = highTempRaisedEx)

warn(message = "logging at warn level",
        extraInfo = mapOf("key1" to "value1", "key2" to "value2"))

warn(message = "logging at warn level", cause = highTempRaisedEx,
        extraInfo = mapOf("key1" to "value1", "key2" to "value2"))

error

Kotlin
error(message = "logging at error level")

error(message = "logging at error level", cause = highTempRaisedEx)

error(message = "logging at error level",
        extraInfo = mapOf("key1" to "value1", "key2" to "value2"))

error(message = "logging at error level", cause = highTempRaisedEx,
        extraInfo = mapOf("key1" to "value1", "key2" to "value2"))

fatal

Kotlin
fatal(message = "logging at fatal level")

fatal(message = "logging at fatal level", cause = highTempRaisedEx)

fatal(message = "logging at fatal level",
        extraInfo = mapOf("key1" to "value1", "key2" to "value2"))

fatal(message = "logging at fatal level", cause = highTempRaisedEx,
        extraInfo = mapOf("key1" to "value1", "key2" to "value2"))

Source code for examples