Search and commands

↑ ↓ to select · Enter to open · Esc to close

Type to search packages.

logging

v0.0.19
go.slink.ws/logging/v2

Documentation

pkg.go.dev ↗

Table of contents

↓ to select · Enter to jump· Shift+Enter for source

16 matches

Top ↑

Functions

DeleteFileLogger

func DeleteFileLogger(id string)

DeleteLogger

func DeleteLogger(id string)

Types

Logger

type Logger interface {
	Clone(newId string) Logger
	Trace(message string, args ...interface{})
	Debug(message string, args ...interface{})
	Info(message string, args ...interface{})
	Warning(message string, args ...interface{})
	Warn(message string, args ...interface{})
	Error(message string, args ...interface{})
	Fatal(message string, args ...interface{})
	Panic(message string, args ...interface{})
	IsTraceEnabled() bool
	IsDebugEnabled() bool
	IsInfoEnabled() bool
	IsWarningEnabled() bool
	IsErrorEnabled() bool
	IsFatalEnabled() bool
	IsPanicEnabled() bool
	SetLevel(level string) Logger
	GetLevel() string
}

GetCustomLogger

func GetCustomLogger(id string, logFn func(msg string)) Logger

GetCustomLoggerWithTimestamp

func GetCustomLoggerWithTimestamp(id string, logFn func(msg string)) Logger

GetFileLogger

func GetFileLogger(file *os.File, id string) Logger

GetLogger

func GetLogger(id string, opts ...Option) Logger

GetNoOpLogger

func GetNoOpLogger() Logger

Option

type Option func(zerolog.Context) zerolog.Context

With

func With(args ...interface{}) Option

WithCaller

func WithCaller(skipFrameCount ...int) Option

WithHook

func WithHook(hook zerolog.Hook) Option

WithLevel

func WithLevel(level zerolog.Level) Option

WithLevelStr

func WithLevelStr(level string) Option

Dependency graph