Documentation ¶
Index ¶
- Constants
- func Default() *slog.Logger
- func DefaultStdLog() *log.Logger
- func New(cfg *Config) (*slog.Logger, error)
- func NewJsonLogger(out string) (*slog.Logger, error)
- func NewTextLogger(out string) (*slog.Logger, error)
- func StdLog(out, format string) (*log.Logger, error)
- type Config
- type Logger
- type MultiHandler
Constants ¶
View Source
const ( TextFormat = "text" JsonFormat = "json" )
Variables ¶
This section is empty.
Functions ¶
func DefaultStdLog ¶ added in v1.24.7
Types ¶
type Config ¶
type Config struct { slog.HandlerOptions OutputPaths []string Format string ErrPaths []string }
func DefaultConfig ¶
func DefaultConfig() *Config
type MultiHandler ¶
type MultiHandler struct {
// contains filtered or unexported fields
}
func NewMultiHandler ¶
func NewMultiHandler(config *Config) (*MultiHandler, error)
Click to show internal directories.
Click to hide internal directories.