log

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(v ...any)

func Debugf

func Debugf(format string, v ...any)

func Error

func Error(v ...any)

func Errorf

func Errorf(format string, v ...any)

func Fatal

func Fatal(v ...any)

func Fatalf

func Fatalf(format string, v ...any)

func Fatalln

func Fatalln(v ...any)

func Flags

func Flags() int

func Info

func Info(v ...any)

func Infof

func Infof(format string, v ...any)

func Output

func Output(callDepth int, s string) error

func Panic

func Panic(v ...any)

func Panicf

func Panicf(format string, v ...any)

func Panicln

func Panicln(v ...any)

func Prefix

func Prefix() string

func Print

func Print(v ...any)

API drop-in

func Printf

func Printf(format string, v ...any)

func Println

func Println(v ...any)

func SetFlags

func SetFlags(flag int)

func SetLevel

func SetLevel(level Level)

func SetOutput

func SetOutput(w io.Writer)

Wrappers

func SetPrefix

func SetPrefix(p string)

func SetTimeLayout

func SetTimeLayout(layout string)

func SetUTC

func SetUTC(enable bool)

func Warn

func Warn(v ...any)

func Warnf

func Warnf(format string, v ...any)

func Writer

func Writer() io.Writer

Types

type Level

type Level int32
const (
	LevelDebug Level = iota
	LevelInfo
	LevelWarn
	LevelError
)

type Logger

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

func Default

func Default() *Logger

func (*Logger) Flags

func (l *Logger) Flags() int

func (*Logger) Prefix

func (l *Logger) Prefix() string

func (*Logger) SetFlags

func (l *Logger) SetFlags(flag int)

func (*Logger) SetLevel

func (l *Logger) SetLevel(level Level)

func (*Logger) SetOutput

func (l *Logger) SetOutput(w io.Writer)

func (*Logger) SetPrefix

func (l *Logger) SetPrefix(p string)

func (*Logger) SetTimeLayout

func (l *Logger) SetTimeLayout(layout string)

func (*Logger) SetUTC

func (l *Logger) SetUTC(enable bool)

func (*Logger) Writer

func (l *Logger) Writer() io.Writer

Jump to

Keyboard shortcuts

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