chore: set log level for all loggers based on logger passed (#1011)

This commit is contained in:
Prem Chaitanya Prathi 2024-01-25 19:39:49 +05:30 committed by GitHub
parent 190d8e8e08
commit 5fdd0da9ee
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 0 deletions

View File

@ -155,6 +155,7 @@ func (w WakuNodeParameters) AddressFactory() basichost.AddrsFactory {
func WithLogger(l *zap.Logger) WakuNodeOption {
return func(params *WakuNodeParameters) error {
params.logger = l
logging.SetAllLoggers(logging.LogLevel(l.Level()))
logging.SetPrimaryCore(l.Core())
return nil
}