logger

package
v0.11.5 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultLogDir

func DefaultLogDir(appName string) string

DefaultLogDir function returns default log directory ($XDG_CACHE_HOME/appName/)

func LevelList

func LevelList() []string

func New

func New(lvl Level, name, confDir, logDir string) (*log.ZapEventLogger, error)

New function returns new zerolog.Logger instance.

func Nop added in v0.4.1

func Nop() *log.ZapEventLogger

Nop function returns nop logger

Types

type Level added in v0.4.1

type Level int
const (
	LevelUnknown Level = iota
	LevelNop
	LevelError
	LevelWarn
	LevelInfo
	LevelDebug
	LevelTrace
)

func LevelFrom

func LevelFrom(s string) Level

func (Level) GologLevel added in v0.4.1

func (lvl Level) GologLevel() (log.LogLevel, error)

func (Level) String added in v0.4.1

func (lvl Level) String() string

Jump to

Keyboard shortcuts

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