You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello thanks for this library. It is really useful.
After working a while with it, I wanted to use the redact feature of pino to remove some sensitive information from the loglines. Unfortunately I found an unwanted behavior.
In this sandbox I've added a minimal example where I both defined the redact property in the pino and hapiPino property of the laabr options. The property in the hapiPino setting is completely ignored, as the Pino instance is created inside the logger.js without passing the options to Pino. When hapi-pino is initialized, it reuses the pino instance, but is unable to inject the redact settings, as they are used at the construction of Pino.
When the property in the pino setting is enabled, an exception is thrown. This results from the redact function which returns a string, this is then passed to the prettifier function in laabr. At the validation step for the preformatter an error is thrown, as it expects an Object.
I hope this helps to find a solution for this bug.
The text was updated successfully, but these errors were encountered:
Thanks, Daniel for raising this issue and providing the sandbox — much appreciated. Let me delve into this issue, sounds like a fun topic. It might take a while as I'm pretty busy right now.
Hello thanks for this library. It is really useful.
After working a while with it, I wanted to use the redact feature of pino to remove some sensitive information from the loglines. Unfortunately I found an unwanted behavior.
In this sandbox I've added a minimal example where I both defined the redact property in the
pino
andhapiPino
property of the laabr options. The property in the hapiPino setting is completely ignored, as the Pino instance is created inside thelogger.js
without passing the options to Pino. When hapi-pino is initialized, it reuses the pino instance, but is unable to inject the redact settings, as they are used at the construction of Pino.When the property in the pino setting is enabled, an exception is thrown. This results from the redact function which returns a string, this is then passed to the prettifier function in laabr. At the validation step for the preformatter an error is thrown, as it expects an Object.
I hope this helps to find a solution for this bug.
The text was updated successfully, but these errors were encountered: