Skip to content

Commit

Permalink
Log term value and win dim
Browse files Browse the repository at this point in the history
  • Loading branch information
aymanbagabas committed Aug 12, 2021
1 parent 912de2f commit 875f93d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions server/middleware/logging/logging.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
}
}
}

0 comments on commit 875f93d

Please sign in to comment.