mirror of
https://github.com/logos-messaging/storenode-messages-counter.git
synced 2026-01-05 23:53:10 +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/logging"
|
||||||
"github.com/waku-org/storenode-messages/internal/persistence"
|
"github.com/waku-org/storenode-messages/internal/persistence"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
|
"go.uber.org/zap/zapcore"
|
||||||
"google.golang.org/protobuf/proto"
|
"google.golang.org/protobuf/proto"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -92,8 +93,13 @@ func Execute(ctx context.Context, options Options) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
lvl, err := zapcore.ParseLevel(options.LogLevel)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
wakuNode, err := node.New(
|
wakuNode, err := node.New(
|
||||||
node.WithLogLevel(zap.DebugLevel), // options.LogLevel
|
node.WithLogLevel(lvl),
|
||||||
node.WithNTP(),
|
node.WithNTP(),
|
||||||
node.WithClusterID(uint16(options.ClusterID)),
|
node.WithClusterID(uint16(options.ClusterID)),
|
||||||
node.WithHostAddress(hostAddr),
|
node.WithHostAddress(hostAddr),
|
||||||
|
|||||||
@ -11,7 +11,7 @@ var options Options
|
|||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
// Defaults
|
// Defaults
|
||||||
options.LogLevel = "INFO"
|
options.LogLevel = "DEBUG"
|
||||||
options.LogEncoding = "console"
|
options.LogEncoding = "console"
|
||||||
|
|
||||||
app := &cli.App{
|
app := &cli.App{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user