mirror of
https://github.com/logos-messaging/storenode-messages-counter.git
synced 2026-01-02 14:13:11 +00:00
fix: parse log level
This commit is contained in:
parent
33b98bedb1
commit
eeedcd38f2
@ -21,6 +21,7 @@ import (
|
||||
"github.com/waku-org/storenode-messages/internal/logging"
|
||||
"github.com/waku-org/storenode-messages/internal/persistence"
|
||||
"go.uber.org/zap"
|
||||
"go.uber.org/zap/zapcore"
|
||||
"google.golang.org/protobuf/proto"
|
||||
)
|
||||
|
||||
@ -92,8 +93,13 @@ func Execute(ctx context.Context, options Options) error {
|
||||
return err
|
||||
}
|
||||
|
||||
lvl, err := zapcore.ParseLevel(options.LogLevel)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
wakuNode, err := node.New(
|
||||
node.WithLogLevel(zap.DebugLevel), // options.LogLevel
|
||||
node.WithLogLevel(lvl),
|
||||
node.WithNTP(),
|
||||
node.WithClusterID(uint16(options.ClusterID)),
|
||||
node.WithHostAddress(hostAddr),
|
||||
|
||||
@ -11,7 +11,7 @@ var options Options
|
||||
|
||||
func main() {
|
||||
// Defaults
|
||||
options.LogLevel = "INFO"
|
||||
options.LogLevel = "DEBUG"
|
||||
options.LogEncoding = "console"
|
||||
|
||||
app := &cli.App{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user