logger

package
v1.1.6 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(cfg LogConfig) *slog.Logger

func NewDefault

func NewDefault(w io.Writer, opts *slog.HandlerOptions) *slog.Logger

Types

type Level

type Level string
const (
	DEBUG Level = "DEBUG"
	INFO  Level = "INFO"
	WARN  Level = "WARN"
	ERROR Level = "ERROR"
)

type LogConfig

type LogConfig struct {
	Environment string
	LogLevel    Level
}

type SilentLogger

type SilentLogger struct{}

func (*SilentLogger) Fatalf

func (*SilentLogger) Fatalf(format string, v ...interface{})

func (*SilentLogger) Printf

func (*SilentLogger) Printf(format string, v ...interface{})

Jump to

Keyboard shortcuts

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