Skip to content

Commit

Permalink
Migrate to structured logging in session handling code.
Browse files Browse the repository at this point in the history
  • Loading branch information
russjones committed Feb 20, 2018
1 parent 5254760 commit c8192e1
Show file tree
Hide file tree
Showing 4 changed files with 252 additions and 214 deletions.
3 changes: 3 additions & 0 deletions constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@ const (
// ComponentKeyGen is the public/private keypair generator.
ComponentKeyGen = "keygen"

// ComponentSession is an active session.
ComponentSession = "session"

// DebugEnvVar tells tests to use verbose debug output
DebugEnvVar = "DEBUG"

Expand Down
5 changes: 4 additions & 1 deletion lib/srv/forward/sshserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,10 @@ func New(c ServerConfig) (*Server, error) {
sessionServer: c.AuthClient,
}

s.sessionRegistry = srv.NewSessionRegistry(s)
s.sessionRegistry, err = srv.NewSessionRegistry(s)
if err != nil {
return nil, trace.Wrap(err)
}

// common auth handlers
s.authHandlers = &srv.AuthHandlers{
Expand Down
5 changes: 4 additions & 1 deletion lib/srv/regular/sshserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,10 @@ func New(addr utils.NetAddr,
component = teleport.ComponentNode
}

s.reg = srv.NewSessionRegistry(s)
s.reg, err = srv.NewSessionRegistry(s)
if err != nil {
return nil, trace.Wrap(err)
}

// add in common auth handlers
s.authHandlers = &srv.AuthHandlers{
Expand Down
Loading

0 comments on commit c8192e1

Please sign in to comment.