Hello,
I canโt seem to stop redwood from tracing an incredible amount while developing. The output Iโm seeing that I no longer want to see is tagged as custom output. Right now, both the normal-looking logs (with the pine trees) and the custom tracing is being logged. A single page load looks something like this:
13:12:15 ๐ฒ incoming request GET xxx /auth?method=getToken
api | ๐ Custom
api | {
api | "time": 1701378735514,
api | "pid": 16556,
api | "hostname": "mac.lan",
api | "reqId": "req-1",
api | "req": {
api | "method": "GET",
api | "url": "/auth?method=getToken",
api | "hostname": "localhost:8910",
api | "remoteAddress": "::1",
api | "remotePort": 57258
api | },
api | "msg": "incoming request"
api | }
api | 13:12:15 ๐ฒ Starting a postgresql pool with 25 connections.
api | ๐ Custom
api | {
api | "time": 1701378735522,
api | "pid": 16556,
api | "hostname": "mac.lan",
api | "prisma": {
api | "clientVersion": "4.16.1"
api | },
api | "timestamp": "2023-11-30T21:12:15.522Z",
api | "target": "quaint::pooled",
api | "msg": "Starting a postgresql pool with 25 connections."
api | }
api | 13:12:15 ๐ฒ request completed 35ms
api | ๐ Custom
api | {
api | "time": 1701378735550,
api | "pid": 16556,
api | "hostname": "mac.lan",
api | "reqId": "req-1",
api | "res": {
api | "statusCode": 200
api | },
api | "msg": "request completed"
api | }
api | 13:12:15 ๐ฒ incoming request POST xxx /graphql
api | ๐ Custom
api | {
api | "time": 1701378735553,
api | "pid": 16556,
api | "hostname": "mac.lan",
api | "reqId": "req-2",
api | "req": {
api | "method": "POST",
api | "url": "/graphql",
api | "hostname": "localhost:8910",
api | "remoteAddress": "::1",
api | "remotePort": 57260
api | },
api | "msg": "incoming request"
api | }
api | 13:12:15 ๐ฒ request completed 11ms
api | ๐ Custom
api | {
api | "time": 1701378735565,
api | "pid": 16556,
api | "hostname": "mac.lan",
api | "reqId": "req-2",
api | "res": {
api | "statusCode": 200
api | },
api | "msg": "request completed"
api | }
api | 13:12:15 ๐ฒ incoming request POST xxx /graphql
api | ๐ Custom
api | {
api | "time": 1701378735580,
api | "pid": 16556,
api | "hostname": "mac.lan",
api | "reqId": "req-3",
api | "req": {
api | "method": "POST",
api | "url": "/graphql",
api | "hostname": "localhost:8910",
api | "remoteAddress": "::1",
api | "remotePort": 57261
api | },
api | "msg": "incoming request"
api | }
api | 13:12:15 ๐ฒ request completed 10ms
api | ๐ Custom
api | {
api | "time": 1701378735591,
api | "pid": 16556,
api | "hostname": "mac.lan",
api | "reqId": "req-3",
api | "res": {
api | "statusCode": 200
api | },
api | "msg": "request completed"
api | }
Iโm trying to remove all the extra-verbose custom parts. I can make those custom parts go away by changing the fastify config in server.config.js to:
logger: {
level: 'warn',
},
but that also removes all the normal debug logging (the pine trees go away). If I set the log level to even โinfoโ in that file, the custom logs re-appear. Iโve tried every combination of modifying log levels in server.config.js, src/lib/logger.ts, .env - setting everything to debug, in all of those places, for example, does not remove the additional verbose custom logging.
In a few places, the redwood docs say that โtraceโ is the default log level in development, and I assume somehow that level is getting passed to fastify and overriding my levels or something? I can find nowhere in my code that even contains the level โtraceโ, but this looks like trace-level output.
Any ideas on what magic setting I can put somewhere to clean up my logging so that itโs legible? Right now Iโm scrolling through hundreds of lines every request.