Help us shape the future of Go! Take the 2026 Go Developer Survey

logger

package
v0.3.15 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Level added in v0.3.13

type Level int

Level values match the log_level config option. Note that Info is the most verbose.

const (
	CriticalLevel Level = iota + 1
	ErrorLevel
	WarningLevel
	NoticeLevel
	DebugLevel
	InfoLevel
)

type Logger

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

func New

func New(out io.Writer, opts Options) *Logger

func (*Logger) CriticalF

func (l *Logger) CriticalF(format string, a ...any)

func (*Logger) DebugF

func (l *Logger) DebugF(format string, a ...any)

func (*Logger) ErrorF

func (l *Logger) ErrorF(format string, a ...any)

func (*Logger) FatalF

func (l *Logger) FatalF(format string, a ...any)

func (*Logger) InfoF

func (l *Logger) InfoF(format string, a ...any)

func (*Logger) NoticeF

func (l *Logger) NoticeF(format string, a ...any)

func (*Logger) WarningF

func (l *Logger) WarningF(format string, a ...any)

type Options added in v0.3.13

type Options struct {
	Level     Level
	Color     bool
	PrintFile bool
}

Jump to

Keyboard shortcuts

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