log

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2024 License: MIT Imports: 11 Imported by: 74

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(v ...interface{})

func Debugf

func Debugf(format string, v ...interface{})

func Debugln

func Debugln(v ...interface{})

func EnableColor

func EnableColor()

func EnableLongFile

func EnableLongFile()

func Error

func Error(v ...interface{})

func Errorf

func Errorf(format string, v ...interface{})

func Errorln

func Errorln(v ...interface{})

func Fatal

func Fatal(v ...interface{})

func Fatalf

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

func Fatalln

func Fatalln(v ...interface{})

func Info

func Info(v ...interface{})

func Infof

func Infof(format string, v ...interface{})

func Infoln

func Infoln(v ...interface{})

func IsLevelEnabled

func IsLevelEnabled(level Level) bool

func LevelSetByFlag

func LevelSetByFlag() bool

LevelSetByFlag returns true if log level is set by flag, so that it is possible to let flag input can override SetLevel() from config file

func Panic

func Panic(v ...interface{})

func Panicf

func Panicf(format string, v ...interface{})

func Panicln

func Panicln(v ...interface{})

func SetDir

func SetDir(dir string)

func SetFileName

func SetFileName(name string)

func SetFilePathSplit

func SetFilePathSplit(value string)

func SetLevel

func SetLevel(level Level)

API for the standard logger

func SetLevelByName

func SetLevelByName(name string)

func SetOutput

func SetOutput(w io.Writer)

func SetPrefix

func SetPrefix(prefix string)

func Trace

func Trace(v ...interface{})

func Tracef

func Tracef(format string, v ...interface{})

func Traceln

func Traceln(v ...interface{})

func Warn

func Warn(v ...interface{})

func Warnf

func Warnf(format string, v ...interface{})

func Warnln

func Warnln(v ...interface{})

Types

type Level

type Level uint

Level of severity.

const (
	TraceLevel Level = iota
	DebugLevel
	InfoLevel
	WarnLevel
	ErrorLevel
	FatalLevel
	PanicLevel
)

Log levels.

func (*Level) Set

func (l *Level) Set(value string) error

Set is part of the flag.Value interface.

func (*Level) String

func (l *Level) String() string

String is part of the flag.Value interface.

type Logger

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

Logger obejct

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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