failed connection logs: rename host to client_ip

This commit is contained in:
Nicola Murino 2019-11-11 19:53:27 +01:00
parent 2221d3307a
commit 74367a65cc
2 changed files with 3 additions and 3 deletions

View file

@ -455,8 +455,8 @@ The logs can be divided into the following categories:
- **"connection failed logs"**, logs for failed attempts to initialize a connection. A connection can fail for an authentication error or other errors such as a client abort or a time out if the login does not happen in two minutes
- `sender` string. `connection_failed`
- `level` string
- `username`, string. Can be empty if the client open the connection and don't try to login
- `host` string.
- `username`, string. Can be empty if the connection is closed before an authentication attempt
- `client_ip` string.
- `login_type` string. Can be `public_key`, `password` or `no_auth_tryed`
- `error` string. Optional error description

View file

@ -170,7 +170,7 @@ func ConnectionFailedLog(user, ip, loginType, errorString string) {
logger.Debug().
Timestamp().
Str("sender", "connection_failed").
Str("host", ip).
Str("client_ip", ip).
Str("username", user).
Str("login_type", loginType).
Str("error", errorString).