From a55e8547d34487a4eaff1ca9832b250d4e45196f Mon Sep 17 00:00:00 2001 From: wurui Date: Sat, 23 Nov 2024 12:11:00 +0800 Subject: [PATCH] feat(zipper): log error when authentication failed (#944) --- core/server.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/server.go b/core/server.go index 9a6054060..6820cec79 100644 --- a/core/server.go +++ b/core/server.go @@ -275,11 +275,13 @@ func (s *Server) handleConn(conn *Connection) { func (s *Server) authenticate(hf *frame.HandshakeFrame) (metadata.M, error) { md, err := auth.Authenticate(s.opts.auths, hf) if err != nil { - s.logger.Warn( + s.logger.Error( "authentication failed", + "err", err, "client_type", ClientType(hf.ClientType).String(), "client_name", hf.Name, - "credential", hf.AuthName, + "auth_name", hf.AuthName, + "auth_payload", string(hf.AuthPayload), ) return nil, err }