diff --git a/server/middleware/logging/logging.go b/server/middleware/logging/logging.go index b25150447..10638eab9 100644 --- a/server/middleware/logging/logging.go +++ b/server/middleware/logging/logging.go @@ -11,9 +11,10 @@ func Middleware() middleware.Middleware { return func(sh ssh.Handler) ssh.Handler { return func(s ssh.Session) { hpk := s.PublicKey() != nil - log.Printf("%s connect %v %v\n", s.RemoteAddr().String(), hpk, s.Command()) + pty, _, _ := s.Pty() + log.Printf("%s connect %v %v %s %v %v\n", s.RemoteAddr().String(), hpk, s.Command(), pty.Term, pty.Window.Width, pty.Window.Height) sh(s) - log.Printf("%s disconnect %v %v\n", s.RemoteAddr().String(), hpk, s.Command()) + log.Printf("%s disconnect\n", s.RemoteAddr().String()) } } }