mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-09-25 01:53:03 +02:00
logs: standardise log filenames to xamxam-{service}-{date}.log
This commit is contained in:
@@ -45,7 +45,7 @@ Do not replace any existing class yet. Just build the foundation.
|
||||
```
|
||||
|
||||
Each channel gets:
|
||||
- A `RotatingFileHandler` writing to `storage/logs/{channel}.log`, keeping 30 days
|
||||
- A `RotatingFileHandler` writing to `xamxam-{channel}.log` (production: `/var/log/xamxam/`; dev: `storage/logs/`), keeping 30 days
|
||||
- A `JsonFormatter` so log lines stay JSON (preserving the existing format contract)
|
||||
- Log level set from an environment variable (`LOG_LEVEL`, defaulting to `WARNING` in production, `DEBUG` in dev)
|
||||
|
||||
@@ -58,7 +58,7 @@ one file at a time without passing instances around.
|
||||
|
||||
- Rewrite `AppLogger` as a thin wrapper that delegates to `Logger::get('app')`
|
||||
- Keep the existing public method signatures identical — no call sites change in this step
|
||||
- Run the app, verify log output appears in `storage/logs/app.log`
|
||||
- Run the app, verify log output appears in `xamxam-app.log` (see the log dir for the active SAPI)
|
||||
- Delete the old file-writing implementation inside `AppLogger`, keep the class as a facade for now
|
||||
|
||||
---
|
||||
|
||||
Reference in New Issue
Block a user