Function initialize_logging_with_log_prefix

Source
pub fn initialize_logging_with_log_prefix(
    clock: impl TelemetryClock + Send + 'static,
    prefix_env_var: Option<String>,
)
Expand description

Set up logging based on the given execution environment. We specialize logging based on how the logs are consumed. The destination scuba table is specialized based on the execution environment. mast -> monarch_tracing/prod devserver -> monarch_tracing/local unit test -> monarch_tracing/test scuba logging won’t normally be enabled for a unit test unless we are specifically testing logging, so you don’t need to worry about your tests being flakey due to scuba logging. You have to manually call initialize_logging() to get this behavior.

tracing logs will be prefixed with the given prefix and routed to: test -> stderr local -> /tmp/monarch_log.log mast -> /logs/dedicated_monarch_logs.log Additionally, is MONARCH_STDERR_LOG sets logs level, then logs will be routed to stderr as well.