Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Configure Logging

Edit config/logging.toml

Appender

Stdout

Writes to stdout.

[appenders.stdout]
kind = "console"

[appenders.stdout.encoder]
pattern = "{d(%H:%M:%S%.3f)} [{l}] [{T}] {M}:{L} - {m}{n}"

Tip

Documentation of the date format library Date Formatting Syntax

Tip

On linux the systemd unit captures the stdout. Do not use any special characters or colors.

File

Writes to file.

[appenders.file-application]
kind = "file"
path = "log/reactive-graph.log"

[appenders.file-application.encoder]
pattern = "{d(%Y-%m-%d %H:%M:%S%.3f)} [{l}] [{T}] {M}:{L} - {m}{n}"

Default log level

Set the default logging level to “debug” and attach the stdout and file-application appender to the root.

[root]
level = "debug"
appenders = ["stdout", "file-application"]

Per Log levels

Set the log level for a specific module:

[loggers."reactive_graph_type_system_impl::component_manager_impl"]
level = "info"

Tip

Documentation of the logging library How to configure the loggers

Additive

Route log events sent to the reactive_graph_plugin_service_impl::plugin_resolver_impl logger to the plugin_resolver appender, and not the normal appenders installed at the root.

[loggers."reactive_graph_plugin_service_impl::plugin_resolver_impl"]
level = "debug"
appenders = ["plugin_resolver"]
additive = false