Skip to content

Commit ccd7ae6

Browse files
committed
feat: improve logging
1 parent 7d1f2f1 commit ccd7ae6

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

internal/bgp/bgp.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@ func (s *bgpSrv) remove(prefix *bgpapi.IPAddressPrefix, asn uint32) error {
9494
}
9595

9696
found, _ := s.find([]*bgpapi.IPAddressPrefix{prefix})
97+
s.L().Info().Msgf("Removing prefix: %s, found: %b", prefix.String(), found != nil)
98+
9799
if found != nil {
98100
e := s.bgp.DeletePath(context.Background(), &bgpapi.DeletePathRequest{
99101
Path: newBgpPath(prefix, asn, s.id.String()),

internal/dns/loop.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ func (c *cache) loop(ctx context.Context) {
5151
sleepUntil = now.Add(cfg.Dns.Cache.MinTtl * time.Second)
5252
}
5353

54-
c.L().Info().Msgf("DSN Refresher will sleep until %s for %d seconds", sleepUntil.Format(time.RFC3339),
54+
c.L().Info().Msgf("DNS Refresher will sleep until %s for %d seconds", sleepUntil.Format(time.RFC3339),
5555
sleepUntil.Sub(now) / time.Second)
5656
timeout, cancelTimeout := context.WithDeadline(ctx, sleepUntil)
5757

internal/dns/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ func Serve(ctx context.Context) error {
4343

4444
dns.HandleFunc(".", _resolvers.proxyQuery)
4545
if e := _server.ListenAndServe(); e != nil {
46-
log.L().Fatal().Str("m", "dns").Err(e).Msg("Failed to bind DSN resolver")
46+
log.L().Fatal().Str("m", "dns").Err(e).Msg("Failed to bind DNS resolver")
4747
}
4848
}(ctx)
4949

0 commit comments

Comments
 (0)