mirror of
https://github.com/drakkan/sftpgo.git
synced 2024-11-22 07:30:25 +00:00
log: fix level for transfer logs
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
parent
c9d4920e81
commit
e1008c30bf
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