aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRunxi Yu <me@runxiyu.org>2024-12-12 06:46:49 +0800
committerRunxi Yu <me@runxiyu.org>2024-12-12 06:46:49 +0800
commit60dfab55227e9452abe35765dbae6d191a8f5406 (patch)
treee06a9c7277f87366391aae493e796483b54e333e
parentUse uint32 for SIDs, uint64 for CIDs (diff)
downloadmeseircd-60dfab55227e9452abe35765dbae6d191a8f5406.tar.gz
meseircd-60dfab55227e9452abe35765dbae6d191a8f5406.tar.zst
meseircd-60dfab55227e9452abe35765dbae6d191a8f5406.zip
Use CID instead of connection pointers while logging
-rw-r--r--clients.go2
-rw-r--r--main.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/clients.go b/clients.go
index abf7283..eb97ebe 100644
--- a/clients.go
+++ b/clients.go
@@ -27,7 +27,7 @@ func (client *Client) SendRaw(s string) error {
if client.conn == nil {
panic("not implemented")
}
- slog.Debug("send", "line", s, "conn", client.conn)
+ slog.Debug("send", "line", s, "client", client.CID)
_, err := (*client.conn).Write([]byte(s))
if err != nil {
// TODO: Should shut down the netFd instead but the stdlib
diff --git a/main.go b/main.go
index 5fa4cad..ecfb4c5 100644
--- a/main.go
+++ b/main.go
@@ -62,7 +62,7 @@ messageLoop:
(*client.conn).Close()
return
}
- slog.Debug("recv", "line", line, "conn", client.conn)
+ slog.Debug("recv", "line", line, "client", client.CID)
msg, err := parseIRCMsg(line)
if err != nil {
switch err {