Skip to content

Commit 117496a

Browse files
committed
feat: set bgp log level according to config
1 parent 7069684 commit 117496a

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

internal/bgp/main.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@ import (
44
"context"
55
bgpapi "github.com/osrg/gobgp/v3/api"
66
bgpsrv "github.com/osrg/gobgp/v3/pkg/server"
7-
"github.com/rs/zerolog"
8-
9-
//"github.com/cornelk/hashmap"
107
"github.com/red55/bgp-dns/internal/config"
118
"github.com/red55/bgp-dns/internal/log"
129
"github.com/red55/bgp-dns/internal/loop"
@@ -41,7 +38,7 @@ func Serve(ctx context.Context) (e error) {
4138
_bgp = &bgpSrv{
4239
Loop: loop.NewLoop(1),
4340
Log: log.NewLog(log.L(), "bgp"),
44-
bgp: bgpsrv.NewBgpServer(bgpsrv.LoggerOption(newZeroLogger(zerolog.InfoLevel))),
41+
bgp: bgpsrv.NewBgpServer(bgpsrv.LoggerOption(newZeroLogger(cfg.Log.Level))),
4542
//ipRefCounter: hashmap.New[string, *atomic.Uint64](),
4643
ipRefCounter: make(map[string]*atomic.Uint64),
4744
asn: cfg.Bgp.Asn,

0 commit comments

Comments
 (0)