log

package
v0.0.0-...-2a43829 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2025 License: MIT Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Logger    *zap.SugaredLogger
	LoggerMap = make(map[string]*zap.SugaredLogger)
)
View Source
var (
	Bold  = "\033[1m"
	Reset = "\033[0m"

	Orange = "\033[38;5;208m"
	Grey   = "\033[90m"
)

Functions

func Debugf

func Debugf(template string, args ...interface{})

Debugf formats the message according to the format specifier and logs it at [DebugLevel].

func Debugln

func Debugln(args ...interface{})

Debugln logs a message at [DebugLevel]. Spaces are always added between arguments.

func Errorf

func Errorf(template string, args ...interface{})

Errorf formats the message according to the format specifier and logs it at [ErrorLevel].

func Errorln

func Errorln(args ...interface{})

Errorln logs a message at [ErrorLevel]. Spaces are always added between arguments.

func Fatalf

func Fatalf(template string, args ...interface{})

Fatalf formats the message according to the format specifier and logs it at [FatalLevel].

func Fatalln

func Fatalln(args ...interface{})

Fatalln logs a message at [FatalLevel] and then calls os.Exit(1). Spaces are always added between arguments.

func Get

func Get(name string) *zap.SugaredLogger

func Infof

func Infof(template string, args ...interface{})

Infof formats the message according to the format specifier and logs it at [InfoLevel].

func Infoln

func Infoln(args ...interface{})

Infoln logs a message at [InfoLevel]. Spaces are always added between arguments.

func Logf

func Logf(lvl zapcore.Level, template string, args ...interface{})

Logf formats the message according to the format specifier and logs it at provided level.

func Logln

func Logln(lvl zapcore.Level, args ...interface{})

Logln logs a message at provided level. Spaces are always added between arguments.

func Printf

func Printf(template string, args ...interface{})

Printf formats the message according to the format specifier and logs it at [InfoLevel]. This is an alias for Infof.

func Println

func Println(args ...interface{})

Println logs a message at [InfoLevel]. Spaces are always added between arguments. This is an alias for Infoln.

func SetupLogger

func SetupLogger(mode string) error

func Warnf

func Warnf(template string, args ...interface{})

Warnf formats the message according to the format specifier and logs it at [WarnLevel].

func Warnln

func Warnln(args ...interface{})

Warnln logs a message at [WarnLevel]. Spaces are always added between arguments.

Types

This section is empty.

Jump to

Keyboard shortcuts

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