mirror of
https://github.com/open-webui/open-webui.git
synced 2026-09-14 23:22:44 +00:00
* feat: add LOG_FORMAT env var with JSON formatter for early logging Introduce LOG_FORMAT environment variable (set to "json" to enable). When active, logging.basicConfig() uses a JSONFormatter that outputs single-line JSON objects with fields: ts, level, msg, caller, error, stacktrace. This covers all log messages emitted during module imports before Loguru's start_logger() takes over. * feat: add JSON sink for Loguru when LOG_FORMAT=json Add _json_sink() as a Loguru sink function that writes single-line JSON to stdout. In start_logger(), conditionally use the JSON sink instead of the plain-text stdout_format when LOG_FORMAT is set to "json". * feat: suppress ASCII banner and fix alembic logging in JSON mode - Wrap the ASCII art banner print in main.py with a LOG_FORMAT != "json" guard so JSON output stays machine-parseable. - Skip alembic's fileConfig() call in migrations/env.py when LOG_FORMAT=json to prevent it from replacing the JSON log handlers installed during early startup. |
||
|---|---|---|
| .. | ||
| images | ||
| mcp | ||
| telemetry | ||
| access_control.py | ||
| actions.py | ||
| anthropic.py | ||
| audit.py | ||
| auth.py | ||
| channels.py | ||
| chat.py | ||
| code_interpreter.py | ||
| embeddings.py | ||
| files.py | ||
| filter.py | ||
| groups.py | ||
| headers.py | ||
| logger.py | ||
| middleware.py | ||
| misc.py | ||
| models.py | ||
| oauth.py | ||
| payload.py | ||
| pdf_generator.py | ||
| plugin.py | ||
| rate_limit.py | ||
| redis.py | ||
| response.py | ||
| sanitize.py | ||
| security_headers.py | ||
| task.py | ||
| tools.py | ||
| validate.py | ||
| webhook.py | ||