worker: simplify request logs to single-line entries

This commit is contained in:
Richard R 2026-05-21 19:44:25 -06:00
parent 661af71fa4
commit bcdff35200

View file

@ -488,7 +488,10 @@ async function main(): Promise<void> {
await ensureComputeModels(); await ensureComputeModels();
} }
const app = Fastify({ logger: buildLoggerConfig() }); const app = Fastify({
logger: buildLoggerConfig(),
disableRequestLogging: true,
});
app.log.info({ app.log.info({
jobConcurrency, jobConcurrency,
whisperTimeoutMs, whisperTimeoutMs,
@ -686,6 +689,7 @@ async function main(): Promise<void> {
app.addHook('onRequest', async (request, reply) => { app.addHook('onRequest', async (request, reply) => {
const path = request.url.split('?')[0] ?? request.url; const path = request.url.split('?')[0] ?? request.url;
if (path === '/health/live' || path === '/health/ready') return; if (path === '/health/live' || path === '/health/ready') return;
app.log.info(`request reqId=${request.id} method=${request.method} path=${path}`);
if (!isAuthed(request, workerToken)) { if (!isAuthed(request, workerToken)) {
return reply.code(401).send({ error: 'Unauthorized' }); return reply.code(401).send({ error: 'Unauthorized' });
} }