Documentation
¶
Index ¶
- Variables
- func Debug(msg string, args ...any)
- func DebugContext(ctx context.Context, msg string, args ...any)
- func Default() *slog.Logger
- func Error(msg string, args ...any)
- func ErrorContext(ctx context.Context, msg string, args ...any)
- func Info(msg string, args ...any)
- func InfoContext(ctx context.Context, msg string, args ...any)
- func Log(ctx context.Context, level slog.Level, msg string, args ...any)
- func LogAttrs(ctx context.Context, level slog.Level, msg string, attrs ...slog.Attr)
- func Marshal(v any) ([]byte, error)
- func MarshalIndent(v any, prefix, indent string) ([]byte, error)
- func SetDefault(l *slog.Logger)
- func SetLogLoggerLevel(level slog.Level) (oldLevel slog.Level)
- func Warn(msg string, args ...any)
- func WarnContext(ctx context.Context, msg string, args ...any)
- func With(args ...any) *slog.Logger
- type Attrs
- type Color
- type Handler
- type Marshaler
- type RawMessage
- type Record
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ReleaseMode bool
)
View Source
var TimeFormat = "[15:04:05.000]"
Functions ¶
func MarshalIndent ¶ added in v1.0.1
func SetDefault ¶
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func NewHandler(opts *slog.HandlerOptions, w io.Writer) *Handler
type RawMessage ¶ added in v1.0.1
type RawMessage = json.RawMessage
Click to show internal directories.
Click to hide internal directories.