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
We have written two custom plugins using hapi-pino for our project written on hapi20 and registered both the plugins with different options. When I am starting the server I am seeing the error hapi-pino is already registered. Any reason why hapi-pino is not supporting multiple registrations?
How can I resolve this issue in my project ? Any help is appreciated, Thanks.
The text was updated successfully, but these errors were encountered:
Using once here won't do the job because if you are setting different options in the two hapi-pino registrations, hapi will only recognize one of those options and apply it to both.
As for why hapi-pino cannot support multiple registrations, the server.decorate('server', 'logger', logger) is to blame for this. The server decoration cannot be defined twice.
Hi,
We have written two custom plugins using
hapi-pino
for our project written on hapi20 and registered both the plugins with different options. When I am starting the server I am seeing the errorhapi-pino is already registered
. Any reason whyhapi-pino
is not supporting multiple registrations?How can I resolve this issue in my project ? Any help is appreciated, Thanks.
The text was updated successfully, but these errors were encountered: