-
Notifications
You must be signed in to change notification settings - Fork 845
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
Performant in-process log stripping #76
Comments
We need to support this in the web framework modules too! |
This is the only thing that is preventing us from seriously evaluate this tool! |
@XVincentX, this is already possible, but probably not easy nor documented :D. @davidmarkclements we should test this in the context of hapi-pino and pino-http. Probably we need options added there too. |
@XVincentX got a first pass going on here https://github.com/davidmarkclements/pino-noir won't be long coming :) |
@mcollina agreed - maybe pino-noir should be included in pino-http and hapi-pino by default and just pass a filter object through - is that your position? |
Ok, https://github.com/davidmarkclements/pino-noir is fully working, version 0.0.1 publish to npm too Works for top level keys and nested keys, does not yet support wildcards, we need to run benchmarks & profile but it should be quite fast since we avoid copying objects to redact nested values by piggy backing on the subsequent JSON.stringify loop @emilyrose would love to get your feedback for pino-noir API |
@mcollina - just to say, since all inputs are strings (or array of strings), we can obv go faster by removing closure scope and compiling a string and passing to new Function, and again apply this same thinking to _.get and _.set - however, I'd like to benchmark the diff if it's not significant enough I'd rather not use new Function |
That sounds great. Let me marinate the new things and I'll give it a try. |
@davidmarkclements, just now getting back to GitHub. It looks beautiful! I love it. |
@emilyrose - I've started on wildcard functionality on the plane, it's not quite there - my time is limited next couple of days so - I'll push anyway in case you want to bring it to land (@XVincentX feel free to PR too!) - immediate steps after that are setting up an integration benchmark, we can copy the object logging benchmarks from pino, and put pino-noir in the middle to benchmark general usage, and wildcard usage |
I'd love to but I am not sure I'm the right person (time/competencies ratio) to do that! |
@davidmarkclements what's the status of this? |
it needs a few hours input to get wildcard done - just need the time |
done :) |
oh wait, need to add to pino readme - doing |
Oh yah this is done |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Sometimes we want to avoid logging sensitive information, post processing isn't ideal for this case so it must be done in process.
We can achieve this with a serialiser generator, which should be a separate module
Once created we can add a section to the readme about handling sensitive info
Cc @mcollina @emilyrose
The text was updated successfully, but these errors were encountered: