log

package
v1.56.0 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(a ...any) (int, error)

func Debugf

func Debugf(format string, a ...any) (int, error)

func Debugln

func Debugln(a ...any) (int, error)

func IsDebugLevel

func IsDebugLevel() bool

func IsWarningLevel

func IsWarningLevel() bool

func SetLevel

func SetLevel(level Level)

func SetWriter

func SetWriter(w io.Writer)

func Warning

func Warning(a ...any) (int, error)

func Warningf

func Warningf(format string, a ...any) (int, error)

func Warningln

func Warningln(a ...any) (int, error)

func Writer

func Writer() io.Writer

Types

type Level

type Level int
const (
	NoneLevel Level = iota
	WarningLevel
	DebugLevel
)

type Logger

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

func Default

func Default() *Logger

func New

func New(w io.Writer, l Level) *Logger

func (Logger) Debug

func (l Logger) Debug(a ...any) (int, error)

func (Logger) Debugf

func (l Logger) Debugf(format string, a ...any) (int, error)

func (Logger) Debugln

func (l Logger) Debugln(a ...any) (int, error)

func (*Logger) IsDebugLevel

func (l *Logger) IsDebugLevel() bool

func (*Logger) IsWarningLevel

func (l *Logger) IsWarningLevel() bool

func (*Logger) Level

func (l *Logger) Level() Level

func (*Logger) SetLevel

func (l *Logger) SetLevel(level Level)

func (*Logger) SetWriter

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

func (Logger) Warning

func (l Logger) Warning(a ...any) (int, error)

func (Logger) Warningf

func (l Logger) Warningf(format string, a ...any) (int, error)

func (Logger) Warningln

func (l Logger) Warningln(a ...any) (int, error)

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