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}\r"
File
Writes to file.
[appenders.file-application]
kind = "file"
path = "log/inexor-rgf-application.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."inexor_rgf_application::implementation::component_manager_impl"]
level = "info"
Additive
Route log events sent to the inexor_rgf_plugin_mqtt::behaviour::relation::mqtt_subscribes
logger
to the file-plugin-mqtt
appender, and not the normal appenders installed at the root.
[loggers."inexor_rgf_plugin_mqtt::behaviour::relation::mqtt_subscribes"]
level = "debug"
appenders = [ "file-plugin-mqtt" ]
additive = false