-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pino-noir hangs the server (redacting req.headers) #1
Comments
Is this with Hapi? I've tried to redact |
Can you please provide an example to reproduce the issue? |
@mcollina see https://github.com/novemberborn/_pino-noir-hapi-repro. I think there the issues are unrelated. The example given for Hapi causes seemingly infinite log output (probably a circular recursion problem). Uncomment https://github.com/novemberborn/_pino-noir-hapi-repro/blob/b0a40659bb2e4a3046095690d88f9c30cfbda3a9/index.js#L42 to see. Redacting cookies is tricky because Clone the repo, run |
ok here's the problem (thanks @novemberborn for the example)
This is going to be a tricky fix, but here's what I reckon is best for minimum impact
@mcollina I'd welcome less ugly ideas - bear in mind I still want to keep fast-safe-stringify legacy compatible (including older browsers etc) so using Symbols is out |
This has the side effect of making JSON.stringify throw if a redacted value is within multiple circular chains. Fixes #1
@mcollina / @davidmarkclements , I'm facing the same exact issue on hapi.. what was the resolution for this ? Versions i'm using :- ├─┬ hapi-pino@2.1.1 |
Complete feature "censor as function"
Tried to use
pino-noir
in the following way:Server hangs.
Note that the
created
property is redacted on the server start event and the bug seems to kick in when having to deal with the request headers.The text was updated successfully, but these errors were encountered: