deleted unnecessary operations
Some checks failed
pr / test (pull_request) Has been cancelled
lint / lint (pull_request) Has been cancelled

This commit is contained in:
Денис Евстигнеев 2023-09-18 10:59:21 +03:00
parent c346ac43dd
commit fd471a89e2

View File

@ -103,12 +103,6 @@ func (s *slogLogger) Log(ctx context.Context, lvl Level, args ...any) {
log.Fatalln(msg, attr)
}
if slvl == slog.LevelError {
l := s.slog.With(slog.Any("ProcStatus", "ERROR"), slog.Any("ErrorText", msg))
l.LogAttrs(ctx, slvl, "", attr...)
return
}
s.slog.LogAttrs(ctx, slvl, msg, attr...)
}
@ -125,12 +119,6 @@ func (s *slogLogger) Logf(ctx context.Context, lvl Level, format string, args ..
log.Fatalln(msg, attr)
}
if slvl == slog.LevelError {
l := s.slog.With(slog.Any("ProcStatus", "ERROR"), slog.Any("ErrorText", msg))
l.LogAttrs(ctx, slvl, "", attr...)
return
}
s.slog.LogAttrs(ctx, slvl, msg, attr...)
}
@ -229,9 +217,6 @@ func renameTime(groups []string, a slog.Attr) slog.Attr {
if a.Key == slog.TimeKey {
a.Key = "@timestamp"
}
if a.Key == slog.MessageKey {
a.Key = "message"
}
return a
}