worker: simplify request logs to single-line entries
This commit is contained in:
parent
661af71fa4
commit
bcdff35200
1 changed files with 5 additions and 1 deletions
|
|
@ -488,7 +488,10 @@ async function main(): Promise<void> {
|
|||
await ensureComputeModels();
|
||||
}
|
||||
|
||||
const app = Fastify({ logger: buildLoggerConfig() });
|
||||
const app = Fastify({
|
||||
logger: buildLoggerConfig(),
|
||||
disableRequestLogging: true,
|
||||
});
|
||||
app.log.info({
|
||||
jobConcurrency,
|
||||
whisperTimeoutMs,
|
||||
|
|
@ -686,6 +689,7 @@ async function main(): Promise<void> {
|
|||
app.addHook('onRequest', async (request, reply) => {
|
||||
const path = request.url.split('?')[0] ?? request.url;
|
||||
if (path === '/health/live' || path === '/health/ready') return;
|
||||
app.log.info(`request reqId=${request.id} method=${request.method} path=${path}`);
|
||||
if (!isAuthed(request, workerToken)) {
|
||||
return reply.code(401).send({ error: 'Unauthorized' });
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue