diff --git a/admin/config/logger.ts b/admin/config/logger.ts index 981e167..3ce310e 100644 --- a/admin/config/logger.ts +++ b/admin/config/logger.ts @@ -18,7 +18,14 @@ const loggerConfig = defineConfig({ targets: targets() .pushIf(!app.inProduction, targets.pretty()) + // Production: write JSON to both the persisted log file (for Debug + // Info bundle export) AND stdout (so `docker logs nomad_admin` and + // any external log aggregator can see runtime telemetry — RAG + // retrieval scores, query rewrites, etc.). Writing to fd 1 via + // pino/file is the standard way to do this; without it, prod + // installs are effectively running blind from a debugger's POV. .pushIf(app.inProduction, targets.file({ destination: "/app/storage/logs/admin.log", mkdir: true })) + .pushIf(app.inProduction, targets.file({ destination: 1 })) .toArray(), }, },