logger

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2024 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateLogger

func CreateLogger(out io.Writer, format LogFormat, level LogLevel) *slog.Logger

Types

type LogFormat

type LogFormat string
const (
	JSON LogFormat = "json"
	Text LogFormat = "text"
)

type LogLevel

type LogLevel string
const (
	Debug LogLevel = "debug"
	Info  LogLevel = "info"
	Warn  LogLevel = "warn"
	Error LogLevel = "error"
)

func (LogLevel) ToSLog

func (l LogLevel) ToSLog() slog.Level

Jump to

Keyboard shortcuts

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