mirror of
https://github.com/usememos/memos.git
synced 2025-10-12 15:26:07 +08:00
chore: update error logger
This commit is contained in:
parent
c1da87a819
commit
e441e3882b
1 changed files with 3 additions and 0 deletions
|
@ -41,4 +41,7 @@ func (*LoggerInterceptor) loggerInterceptorDo(ctx context.Context, fullMethod st
|
||||||
logMsg = "unknown error"
|
logMsg = "unknown error"
|
||||||
}
|
}
|
||||||
slog.LogAttrs(ctx, logLevel, logMsg, slog.String("method", fullMethod))
|
slog.LogAttrs(ctx, logLevel, logMsg, slog.String("method", fullMethod))
|
||||||
|
if err != nil {
|
||||||
|
slog.LogAttrs(ctx, logLevel, "", slog.String("error", err.Error()))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue