logger

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2026 License: LGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultTimeFormat           = "15:04:05.000"
	DefaultCallerSkipFrameCount = 3 // set to 3 because logger wrapped in logger.go

	NoColor   = true
	UseCaller = false // for developer, if you want to expose line of code of caller
)

Variables

This section is empty.

Functions

func Debug

func Debug(args ...any)

Debug function.

func DebugWithFields

func DebugWithFields(msg string, kv map[string]any)

DebugWithFields function.

func Debugf

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

Debugf function.

func Debugln

func Debugln(args ...any)

Debugln function.

func Error

func Error(args ...any)

Error function.

func ErrorE

func ErrorE(err error)

ErrorE function.

func ErrorWithFields

func ErrorWithFields(msg string, kv map[string]any)

ErrorWithFields function.

func Errorf

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

Errorf function.

func Errorln

func Errorln(args ...any)

Errorln function.

func Errors

func Errors(err error)

Errors function to log errors package.

func Info

func Info(args ...any)

Info function.

func InfoWithFields

func InfoWithFields(msg string, kv map[string]any)

InfoWithFields function.

func Infof

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

Infof function.

func Infoln

func Infoln(args ...any)

Infoln function.

func Print

func Print(v ...any)

Print standard print with debug mode validation.

func PrintLogs

func PrintLogs()

PrintLogs print all stacked log.

func Printf

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

Printf standard printf with debug mode validation.

func Println

func Println(v ...any)

Println standard println with debug mode validation.

func SetVerboseMode

func SetVerboseMode(verbose bool)

func Slog

func Slog() *slog.Logger

Slog returns a *slog.Logger that routes through zerolog and is gated on Verbose().

func Verbose

func Verbose() bool

Verbose reports whether verbose/debug logging is enabled.

func Warn

func Warn(args ...any)

Warn function.

func WarnWithFields

func WarnWithFields(msg string, kv map[string]any)

WarnWithFields function.

func Warnf

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

Warnf function.

func Warnln

func Warnln(args ...any)

Warnln function.

Types

This section is empty.

Jump to

Keyboard shortcuts

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