Closed Junkern closed 6 years ago
I updated to the newest restify
version now, and the problem persists, it logs the whole request object with all its internal properties
the api of pino-noir
could probably be improved but you need pass in the standard request serializer to the serializers
option
var restify = require('restify')
var noir = require('pino-noir')
var app = restify.createServer({name: 'app'})
app.use(require('restify-pino-logger')({
serializers: noir({
req: pino.stdSerializers.req,
}, ['key', 'path.to.key', 'check.*', 'also[*]'])
}))
We are using
restify@4.1.1
,restify-pino-logger@2.0.0
and the newestpino-noir
. We have following log structure (showing only important properties):We want to redact the values in the
authorization
andx-forwarded-for
headers:This, however creates HUUUGE logs, it basically does a
JSON.stringify
on thereq
object (about 500 lines of output per log). What am I missing here? Is it due to the old restify version?