mirror of
https://github.com/drakkan/sftpgo.git
synced 2024-11-21 15:10:23 +00:00
log: fix level for transfer logs
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
parent
2ecd20d444
commit
6626c8846b
1 changed files with 7 additions and 1 deletions
|
@ -205,7 +205,13 @@ func ErrorToConsole(format string, v ...any) {
|
|||
func TransferLog(operation, path string, elapsed int64, size int64, user, connectionID, protocol, localAddr,
|
||||
remoteAddr, ftpMode string, err error,
|
||||
) {
|
||||
ev := logger.Info().
|
||||
var ev *zerolog.Event
|
||||
if err != nil {
|
||||
ev = logger.Error()
|
||||
} else {
|
||||
ev = logger.Info()
|
||||
}
|
||||
ev.
|
||||
Timestamp().
|
||||
Str("sender", operation).
|
||||
Str("local_addr", localAddr).
|
||||
|
|
Loading…
Reference in a new issue