Documentation ¶
Index ¶
- Variables
- func Critical(msg string, attrs ...any)
- func CriticalContext(ctx context.Context, msg string, attrs ...any)
- func Debug(msg string, attrs ...any)
- func DebugContext(ctx context.Context, msg string, attrs ...any)
- func Error(msg string, attrs ...any)
- func ErrorContext(ctx context.Context, msg string, attrs ...any)
- func Fatal(msg string, attrs ...any)
- func FatalContext(ctx context.Context, msg string, attrs ...any)
- func Ferror(err error) slog.Attr
- func Info(msg string, attrs ...any)
- func InfoContext(ctx context.Context, msg string, attrs ...any)
- func Notice(msg string, attrs ...any)
- func NoticeContext(ctx context.Context, msg string, attrs ...any)
- func Panic(msg string, attrs ...any)
- func PanicContext(ctx context.Context, msg string, attrs ...any)
- func Warn(msg string, attrs ...any)
- func WarnContext(ctx context.Context, msg string, attrs ...any)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Fstring is alias for slog.String Fstring = slog.String // Fint is alias for slog.Int Fint = slog.Int // Fuint is alias for slog.Uint Fint64 = slog.Int64 // Fuint64 is alias for slog.Uint64 Fuint64 = slog.Uint64 // Ffloat32 is alias for slog.Float32 Ffloat64 = slog.Float64 // Ffloat64 is alias for slog.Float64 Fbool = slog.Bool // Ftime is alias for slog.Time Ftime = slog.Time // Fduration is alias for slog.Duration Fduration = slog.Duration // Fany is alias for slog.Any Fany = slog.Any // With is alias for slog.With With = slog.With )
View Source
var ( SeverityDefault = slog.Level(logging.Default) SeverityDebug = slog.Level(logging.Debug) SeverityInfo = slog.Level(logging.Info) SeverityNotice = slog.Level(logging.Notice) SeverityWarning = slog.Level(logging.Warning) SeverityError = slog.Level(logging.Error) SeverityCritical = slog.Level(logging.Critical) )
Functions ¶
func CriticalContext ¶ added in v0.0.6
CriticalContext logs a critical message with a context.
func DebugContext ¶ added in v0.0.6
DebugContext logs a debug message with a context.
func ErrorContext ¶ added in v0.0.6
ErrorContext logs an error message with a context.
func FatalContext ¶ added in v0.0.6
FatalContext logs a critical message with a context and exits.
func InfoContext ¶ added in v0.0.6
InfoContext logs an info message with a context.
func NoticeContext ¶ added in v0.0.6
NoticeContext logs a notice message with a context.
func PanicContext ¶ added in v0.0.6
PanicContext logs a critical message with a context and panics.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.