slog

package
v0.42.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 23, 2024 License: Apache-2.0, BSD-3-Clause, MIT, + 1 more Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LevelDebug = slog.LevelDebug
	LevelInfo  = slog.LevelInfo
	LevelWarn  = slog.LevelWarn
	LevelError = slog.LevelError
)

Variables

This section is empty.

Functions

func Default

func Default() *slog.Logger

func New

func New(h slog.Handler) *slog.Logger

func NewRecord

func NewRecord(t time.Time, lvl slog.Level, s string, p uintptr) slog.Record

func String

func String(k, v string) slog.Attr

func StringValue

func StringValue(value string) slog.Value

Types

type Attr

type Attr = slog.Attr

type Handler

type Handler = slog.Handler

func NewJSONHandler

func NewJSONHandler(w io.Writer, opts *HandlerOptions) Handler

func NewTextHandler

func NewTextHandler(w io.Writer, opts *HandlerOptions) Handler

type HandlerOptions

type HandlerOptions = slog.HandlerOptions

type Level

type Level = slog.Level

type LevelVar

type LevelVar = slog.LevelVar

type Leveler

type Leveler = slog.Leveler

type Logger

type Logger = slog.Logger

type Record

type Record = slog.Record

type Value

type Value = slog.Value

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL