summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--internal/failover/monitor.go2
-rw-r--r--internal/log/log.go3
2 files changed, 4 insertions, 1 deletions
diff --git a/internal/failover/monitor.go b/internal/failover/monitor.go
index 5efdbd0..0d319d6 100644
--- a/internal/failover/monitor.go
+++ b/internal/failover/monitor.go
@@ -88,7 +88,7 @@ func (m *DroppedConMon) Start(ctx context.Context, gateway string, mtuSize int)
defer ticker.Stop()
// Otherwise send n pings, without waiting for pong and then check if dropped
- slog.Debug("Failover started by sending pings and not waiting for a pong...")
+ slog.Debug("Failover started by sending pings and not waiting for a pong...")
// Loop until the max drop counter
// We begin with 2 as this is used as the sequence number for ping
// and we have already sent a ping
diff --git a/internal/log/log.go b/internal/log/log.go
index d4a9bf5..47cdcf3 100644
--- a/internal/log/log.go
+++ b/internal/log/log.go
@@ -13,6 +13,9 @@ import (
// Init initializes the logger by setting a max level 'level' and a directory 'directory' where the log should be stored
// internally, it uses slog, so any package just imports slog
+// This can be done as this function sets the logger as the default logger in slog
+// It returns the log file and the error
+// This log file should be closed at the end
func Init(lvl slog.Level, dir string) (*os.File, error) {
err := util.EnsureDirectory(dir)
if err != nil {