mirror of
https://github.com/usememos/memos.git
synced 2024-11-11 01:12:40 +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"
|
||||
}
|
||||
slog.LogAttrs(ctx, logLevel, logMsg, slog.String("method", fullMethod))
|
||||
if err != nil {
|
||||
slog.LogAttrs(ctx, logLevel, "", slog.String("error", err.Error()))
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue