Skip to main content

Module logging

Module logging 

Source
Expand description

Runtime-adjustable log level.

Avestruz logs to one place: stderr, which cosmic-panel forwards to the systemd journal, and which is the terminal when the applet is run from one.

main builds the tracing subscriber with its filter wrapped in a [tracing_subscriber::reload] layer, then installs a reload hook here with install_reload_hook. The settings view calls set_console_level to change how much is logged live, without a restart: an applet has no command line to set RUST_LOG on.

Statics§

RELOAD 🔒

Functions§

install_reload_hook
Register the reload hook. Called once from main after the tracing subscriber is initialized. Later calls are ignored.
level_set_by_environment
Whether RUST_LOG says how much to log. If it does, it is what main went by, and it keeps precedence over the setting.
set_console_level
Apply a new log level at runtime.

Type Aliases§

ReloadHook 🔒
Rebuilds the filter for a level and swaps it into the live subscriber. Installed once by main.