logger

package
v1.17.0 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2026 License: MIT Imports: 17 Imported by: 1

Documentation

Index

Constants

View Source
const (
	FormatterText = "text"
	FormatterJson = "json"
)

Formatter types for log output

Variables

This section is empty.

Functions

func GetLevelFromString added in v1.17.0

func GetLevelFromString(level string) log.Level

GetLevelFromString converts a string log level to log.Level.

func NewRotatingFileHandler added in v1.17.0

func NewRotatingFileHandler(w io.Writer, config config.Config, json foundation.Json, level slog.Leveler, formatter string) log.Handler

Types

type ConsoleHandler added in v1.17.0

type ConsoleHandler struct {
	*IOHandler
}

func NewConsoleHandler added in v1.17.0

func NewConsoleHandler(config config.Config, json foundation.Json, level slog.Leveler, formatter string) *ConsoleHandler

type Daily

type Daily struct {
	// contains filtered or unexported fields
}

func NewDaily added in v1.12.0

func NewDaily(config config.Config, json foundation.Json) *Daily

func (*Daily) Handle

func (daily *Daily) Handle(channel string) (log.Handler, error)

type IOHandler added in v1.17.0

type IOHandler struct {
	// contains filtered or unexported fields
}

func NewIOHandler added in v1.17.0

func NewIOHandler(w io.Writer, config config.Config, json foundation.Json, level slog.Leveler, formatter string) *IOHandler

func (*IOHandler) Enabled added in v1.17.0

func (h *IOHandler) Enabled(level log.Level) bool

Enabled reports whether the handler handles records at the given level.

func (*IOHandler) Handle added in v1.17.0

func (h *IOHandler) Handle(entry log.Entry) error

Handle handles the Record.

type Single

type Single struct {
	// contains filtered or unexported fields
}

func NewSingle added in v1.12.0

func NewSingle(config config.Config, json foundation.Json) *Single

func (*Single) Handle

func (single *Single) Handle(channel string) (log.Handler, error)

type StackTrace added in v1.17.0

type StackTrace struct {
	Root struct {
		Message string   `json:"message"`
		Stack   []string `json:"stack"`
	} `json:"root"`
	Wrap []struct {
		Message string `json:"message"`
		Stack   string `json:"stack"`
	} `json:"wrap"`
}

Jump to

Keyboard shortcuts

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