embed assets and minor fixes
This commit is contained in:
@ -19,19 +19,19 @@ func WithLogFields(ctx context.Context, fields ...slog.Attr) context.Context {
|
||||
}
|
||||
|
||||
func LogDebug(ctx context.Context, log *slog.Logger, msg string, attrs ...slog.Attr) {
|
||||
log.LogAttrs(ctx, slog.LevelDebug, msg, append(attrs, getLogFields(ctx)...)...)
|
||||
log.LogAttrs(ctx, slog.LevelDebug, msg, append(getLogFields(ctx), attrs...)...)
|
||||
}
|
||||
|
||||
func LogInfo(ctx context.Context, log *slog.Logger, msg string, attrs ...slog.Attr) {
|
||||
log.LogAttrs(ctx, slog.LevelInfo, msg, append(attrs, getLogFields(ctx)...)...)
|
||||
log.LogAttrs(ctx, slog.LevelInfo, msg, append(getLogFields(ctx), attrs...)...)
|
||||
}
|
||||
|
||||
func LogWarn(ctx context.Context, log *slog.Logger, msg string, attrs ...slog.Attr) {
|
||||
log.LogAttrs(ctx, slog.LevelWarn, msg, append(attrs, getLogFields(ctx)...)...)
|
||||
log.LogAttrs(ctx, slog.LevelWarn, msg, append(getLogFields(ctx), attrs...)...)
|
||||
}
|
||||
|
||||
func LogError(ctx context.Context, log *slog.Logger, msg string, attrs ...slog.Attr) {
|
||||
log.LogAttrs(ctx, slog.LevelError, msg, append(attrs, getLogFields(ctx)...)...)
|
||||
log.LogAttrs(ctx, slog.LevelError, msg, append(getLogFields(ctx), attrs...)...)
|
||||
}
|
||||
|
||||
func LogWithWarnError(ctx context.Context, log *slog.Logger, err error, msg string, attrs ...slog.Attr) {
|
||||
|
||||
Reference in New Issue
Block a user