more logging

This commit is contained in:
adman
2026-04-14 09:20:00 +02:00
parent 76409d07a3
commit acc583f694
5 changed files with 14 additions and 11 deletions
+1 -2
View File
@@ -3,7 +3,6 @@ package client
import (
"errors"
"fmt"
"log/slog"
"github.com/admin-else/strom/event"
"github.com/admin-else/strom/proto"
@@ -20,7 +19,7 @@ func (c *ConfigIgnorer) OnStart() (err error) {
}
func (c *ConfigIgnorer) Default(e event.Anything) (err error) {
slog.Debug("Config ignorer", "packet", fmt.Sprintf("%#v", e))
c.Log.Debug("Config ignorer", "packet", fmt.Sprintf("%#v", e))
return
}
+1 -2
View File
@@ -6,7 +6,6 @@ import (
"crypto/x509"
"encoding/json"
"errors"
"log/slog"
"github.com/admin-else/strom/api"
"github.com/admin-else/strom/crypto"
@@ -45,7 +44,7 @@ func (s *LoginClient) OnDefault(event event.Unhandled) (err error) {
if _, ok := event.Val.(proto_base.EncodeDecodeAble); !ok {
return
}
slog.Warn("unexpected packet during login client", "packet", event.Val)
s.Log.Warn("unexpected packet during login client", "packet", event.Val)
return
}