pub fn init_logging(
app_config: Option<&AppConfig>,
target_crate: &str,
working_dir: &PathBuf,
additional_directives: &[&str],
)Expand description
Initialize logging with optional app config and a target crate name.
Priority order:
RUST_LOGenvironment variable (full control)app.log_levelfrom config.toml (sets global level)- Defaults to
infofor the target crate andwarnfor third-party crates
If app.log_file = true, logs are also written to:
{working_dir}/.robit/logs/robit-YYYY-MM-DD.log (daily rotation)
§Arguments
app_config: OptionalAppConfigfrom config.tomltarget_crate: Name of the target crate (e.g. “robit_tui”, “robit_qq”)working_dir: Working directory for the agent (where .robit/logs is created)additional_directives: Optional additionalDirectives for specific crates