I have healthcheck actions within my services that are called to determine whether the service is up. Due to the frequent calls from automated systems, there are a lot of noise in the debug logs. Is there a way to filter out the system generated debug logs that is printed on each call?
I added logging:false
to the routes
section and that helped to filter out most of the logging in info
but 2 debug logs still gets generated on each healthcheck call
{"ts":1684139586416,"level":"debug","msg":" Alias: \u001b[35m GET\u001b[39m \u001b[36m/api/healthcheck\u001b[39m\u001b[90m => \u001b[39mapi.healthcheck","nodeID":"abc","ns":"","mod":"api","svc":"api"}
{"ts":1684139586417,"level":"debug","msg":"Call action locally. { action: 'api.healthcheck', requestID: '0e62a5bd-7dfe-41b2-af84-f4186758cc99' }","nodeID":"abc","ns":"","mod":"broker"}
I tried to put
{type: "Console", options: {level: {"API": false, "**": "debug"},formatter: "json",}}
in moleculer.config.ts
and that helped to suppress the first debug log but the call action locally log still gets generated.
Is there a better way to not have those 2 debug logs appear, only and only if they are healthcheck
related calls? I would still like to maintain the default system logging behaviour for all other api calls.