@@ -833,7 +833,10 @@ func (a *agent) createTailnet(ctx context.Context, agentID uuid.UUID, derpMap *t
833
833
}
834
834
break
835
835
}
836
- logger .Debug (ctx , "accepted conn" , slog .F ("remote" , conn .RemoteAddr ().String ()))
836
+ clog := logger .With (
837
+ slog .F ("remote" , conn .RemoteAddr ().String ()),
838
+ slog .F ("local" , conn .LocalAddr ().String ()))
839
+ clog .Info (ctx , "accepted conn" )
837
840
wg .Add (1 )
838
841
closed := make (chan struct {})
839
842
go func () {
@@ -865,7 +868,7 @@ func (a *agent) createTailnet(ctx context.Context, agentID uuid.UUID, derpMap *t
865
868
logger .Warn (ctx , "failed to unmarshal init" , slog .F ("raw" , data ))
866
869
return
867
870
}
868
- _ = a .handleReconnectingPTY (ctx , logger , msg , conn )
871
+ _ = a .handleReconnectingPTY (ctx , clog , msg , conn )
869
872
}()
870
873
}
871
874
wg .Wait ()
@@ -1021,12 +1024,12 @@ func (a *agent) handleReconnectingPTY(ctx context.Context, logger slog.Logger, m
1021
1024
// If the agent is closed, we don't want to
1022
1025
// log this as an error since it's expected.
1023
1026
if closed {
1024
- connLogger .Debug (ctx , "reconnecting pty failed with attach error (agent closed)" , slog .Error (err ))
1027
+ connLogger .Info (ctx , "reconnecting pty failed with attach error (agent closed)" , slog .Error (err ))
1025
1028
} else {
1026
1029
connLogger .Error (ctx , "reconnecting pty failed with attach error" , slog .Error (err ))
1027
1030
}
1028
1031
}
1029
- connLogger .Debug (ctx , "reconnecting pty connection closed" )
1032
+ connLogger .Info (ctx , "reconnecting pty connection closed" )
1030
1033
}()
1031
1034
1032
1035
var rpty reconnectingpty.ReconnectingPTY
0 commit comments