INNER CODE UNIT · Python

LOG_TYPES

bunkerity/bunkerweb · src/scheduler/main.py:199

    LOG_TYPES=stderr, so on Linux -- where the scheduler runs with LOG_TYPES=file -- every
    error the config saver reports lands in journald while the scheduler log file only keeps
    the one-line "failed" summary, which reads as "no logs at all".
    """
    cmd_env = {
        "PATH": getenv("PATH", ""),
        "PYTHONPATH": getenv("PYTHONPATH", ""),
        "LOG_LEVEL": getenv("LOG_LEVEL", ""),
        "DATABASE_URI": getenv("DATABASE_URI", ""),
    }

    # Forwarded only when set. An empty CUSTOM_LOG_LEVEL is not "unset" to the child, it is an
    # override that hides LOG_LEVEL and drops it back to INFO, and SCHEDULER_LOG_TO_FILE has to
    # travel too or a file-logging child with no explicit path falls back to stderr.
    for key in ("TZ", "CUSTOM_LOG_LEVEL", "LOG_TYPES", "LOG_FILE_PATH", "LOG_SYSLOG_ADDRESS", "LOG_SYSLOG_TAG", "SCHEDULER_LOG_TO_FILE", "DATABASE_LOG_LEVEL"):
        value = getenv(key)
        if value:
            cmd_env[key] = value

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…