Module logging

Module logging 

Source
Expand description

Framework-level file logger.

Writes to ~/Library/Logs/elemaudio-rs-plugin.log on macOS, $XDG_DATA_HOME/elemaudio-rs-plugin.log on Linux, or %APPDATA%/elemaudio-rs-plugin.log on Windows.

Call init once early in the plugin lifecycle (e.g., in the CLAP new_shared callback). Subsequent calls are no-ops.

Uses the log facade — all log::info!, log::error!, etc. macros write to the file after init.

Realtime safety: The logger acquires a Mutex on every log call. Do NOT use log::* macros on the audio thread.

Functions§

init
Initialize the file logger. Safe to call multiple times — only the first call has any effect.