mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-06-25 16:19:19 +02:00
Integrate Monolog: replace four logging systems with single PSR-3 factory
- Add monolog/monolog dependency (^3.10)
- Create app/Logger.php central factory with channels: app, admin, error, audit
- Each channel gets RotatingFileHandler (30-day retention) with pass-through LineFormatter
preserving existing JSON format contracts
- Rewrite AppLogger as thin facade delegating to Logger::get('app')
- Rewrite ErrorHandler::log() to delegate to Logger::get('error')
- Rewrite AdminLogger file output to delegate to Logger::get('admin'), keep DB writes
- Add Monolog file shadow to Audit via Logger::get('audit') (Option A per monolog-plan)
- Log level controlled by LOG_LEVEL env var (defaults: DEBUG in cli-server, WARNING otherwise)
- Graceful NullHandler fallback when log directory is not writable
- Update SystemController LOG_FILES: remove php_error, add app/admin/error/audit
- JSON app logs parsed to readable one-liners in the log viewer
- Remove nginx config tab (parametres + fragment + template + css)
- Friendly empty-state message when app log files don't exist yet (notYet)
- PHP tail fallback when exec() unavailable
- All 228 PHPUnit tests pass, no call sites changed
This commit is contained in:
@@ -352,29 +352,4 @@
|
||||
border: 1px solid var(--success-muted-border);
|
||||
}
|
||||
|
||||
/* ── Nginx config viewer ───────────────────────────────────────────────── */
|
||||
.nginx-source-badge {
|
||||
display: inline-block;
|
||||
font-size: var(--step--2);
|
||||
font-family: ui-monospace, monospace;
|
||||
padding: var(--space-3xs) var(--space-2xs);
|
||||
border-radius: var(--radius);
|
||||
margin-left: var(--space-2xs);
|
||||
vertical-align: middle;
|
||||
}
|
||||
.nginx-source-badge--live {
|
||||
background: var(--success-muted-bg);
|
||||
color: var(--success);
|
||||
border: 1px solid var(--success-muted-border);
|
||||
}
|
||||
.nginx-source-badge--local {
|
||||
background: var(--warning-muted-bg);
|
||||
color: var(--warning);
|
||||
border: 1px solid var(--warning-muted-border);
|
||||
}
|
||||
/* Nginx syntax highlight layers inside .log-output */
|
||||
.nginx-comment { color: var(--sys-syntax-comment); font-style: italic; }
|
||||
.nginx-directive { color: var(--sys-syntax-directive); }
|
||||
.nginx-block { color: var(--sys-syntax-block); font-weight: 600; }
|
||||
.nginx-value { color: var(--sys-syntax-value); }
|
||||
.nginx-location { color: var(--sys-syntax-location); }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user