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
What are you trying to achieve or the steps to reproduce?
In certain cases I would like to access pino logger specific attributes and functions (e.g. bindings()) even when the route accessing logger might later be ignored using any of the ignoreX options.
What was the result you got?
TypeErrors such as logger.bindings is not a function requiring me to build checks around the presence of methods such as bindings.
What result did you expect?
I was expecting the logger instance on the request to always be of type pino.Logger, but it might be the much simpler nullLogger instance from abstract-logging that is used in case of ignored routes.
Ideally the nullLogger should be extended to implement all methods of the pino.Logger interface, alternatively the typings in hapi-pino should reflect that the logger might be missing some of the methods in pino.Logger.
The text was updated successfully, but these errors were encountered:
Runtime
node.js
Runtime version
18
Module version
12.2.0
Last module version without issue
No response
Used with
hapi application
Any other relevant information
No response
What are you trying to achieve or the steps to reproduce?
In certain cases I would like to access pino logger specific attributes and functions (e.g.
bindings()
) even when the route accessinglogger
might later be ignored using any of theignoreX
options.What was the result you got?
TypeErrors such as
logger.bindings is not a function
requiring me to build checks around the presence of methods such asbindings
.What result did you expect?
I was expecting the logger instance on the request to always be of type pino.Logger, but it might be the much simpler
nullLogger
instance fromabstract-logging
that is used in case of ignored routes.Ideally the nullLogger should be extended to implement all methods of the pino.Logger interface, alternatively the typings in
hapi-pino
should reflect that thelogger
might be missing some of the methods inpino.Logger
.The text was updated successfully, but these errors were encountered: