diff options
author | Nick Thomas <nick@gitlab.com> | 2021-10-06 13:03:27 +0100 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2021-10-06 13:03:27 +0100 |
commit | b33de0edb56f99f0fdcb7e10ab2a1fa0ef1e4d69 (patch) | |
tree | 03d3a04404189b41dc959480ccd6fc0d9d1cec30 /internal/sshd/connection.go | |
parent | 2dafe37c77233152b55e1c5d893a81a9cffd2618 (diff) | |
download | gitlab-shell-b33de0edb56f99f0fdcb7e10ab2a1fa0ef1e4d69.tar.gz |
Fix logging channel typefix-logging-channel-type
Currently we get this in some log messages:
logrus_error="can not add field \"channel_type\""
This is because we're trying to add a function, rather than the result
of the function call (a string) to the `log.Fields`. Whoops!
Changelog: fixed
Diffstat (limited to 'internal/sshd/connection.go')
-rw-r--r-- | internal/sshd/connection.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/sshd/connection.go b/internal/sshd/connection.go index c8f5c00..f6d8fb5 100644 --- a/internal/sshd/connection.go +++ b/internal/sshd/connection.go @@ -34,7 +34,7 @@ func (c *connection) handle(ctx context.Context, chans <-chan ssh.NewChannel, ha defer metrics.SshdConnectionDuration.Observe(time.Since(c.begin).Seconds()) for newChannel := range chans { - ctxlog.WithField("channel_type", newChannel.ChannelType).Info("connection: handle: new channel requested") + ctxlog.WithField("channel_type", newChannel.ChannelType()).Info("connection: handle: new channel requested") if newChannel.ChannelType() != "session" { ctxlog.Info("connection: handle: unknown channel type") newChannel.Reject(ssh.UnknownChannelType, "unknown channel type") |