feat(logging): add opt-in debug logging mode

- Add validated LOG_MODE configuration and route trace-aware diagnostics through debug.
- Select debug mode in shared test setup while preserving DEBUG namespace control.
- Add logger/config regression coverage and document runtime configuration.
This commit is contained in:
agent committed 2026-11-11 13:31:48 -05:00
1 parent ff9a700c86
commit ceed27ad9e
10 files changed
+214 -4

No files matched your search

+2 -1
View File
@@ -30,6 +30,7 @@ All settings are validated at startup by `server/src/config/app.config.ts`.
| `NODE_ENV` | `development` | `production` in the Docker image. Shown in the startup log, and selects the default CORS origins |
| `CORS_ORIGINS` | *(empty)* | Comma-separated origins allowed to call the API cross-origin. When empty: the Vite dev server (`http://localhost:5173`, `http://127.0.0.1:5173`) unless `NODE_ENV=production`, then the compose port (`http://localhost:13000`, `http://127.0.0.1:13000`) |
| `PORT` | `3000` | HTTP port |
| `LOG_MODE` | `console` | `console` preserves the default server output; `debug` routes application diagnostics through the `debug` package and only emits namespaces enabled by `DEBUG` (for example, `DEBUG=liqa:*`). |
| `DB_PATH` | `data/liqa.db` | SQLite database file |
| `FILES_DIR` | `data/files` | Where scenario files and run artifacts are stored |
| `FILE_RUN_EXPIRATION_DAYS` | `7` | How long run artifacts (downloads, failure dumps, traces) are kept |
@@ -191,7 +192,7 @@ Watch mode:
npm -w server run test:watch
```
Print the NestJS logs of the test app (they're silenced by default; `DEBUG=test`):
Server application logs use debug output during tests. They remain quiet unless the `test` namespace is enabled. To see NestJS and application logs:
```bash
npm -w server run test:debug