Skip to content

Commit

Permalink
fix: fixing logger level issue
Browse files Browse the repository at this point in the history
  • Loading branch information
themantre committed Oct 2, 2023
1 parent 6b66ab0 commit 4aca152
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions config/example_config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@
## _grpc = "error"
## _http = "error"
## _network = "info"
## _nonomsg = "error"
## _pool = "error"
## _state = "info"
## _sync = "warning"
Expand Down
1 change: 1 addition & 0 deletions util/logger/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ func DefaultConfig() *Config {
conf.Levels["_pool"] = "error"
conf.Levels["_http"] = "error"
conf.Levels["_grpc"] = "error"
conf.Levels["_nonomsg"] = "error"

return conf
}
Expand Down
2 changes: 1 addition & 1 deletion util/logger/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ func NewSubLogger(name string, obj fmt.Stringer) *SubLogger {

lvl, err := zerolog.ParseLevel(lvlStr)
if err == nil {
sl.logger.Level(lvl)
sl.logger = sl.logger.Level(lvl)
}

inst.subs[name] = sl
Expand Down

0 comments on commit 4aca152

Please sign in to comment.