logger

package
v0.9.5 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2022 License: Apache-2.0 Imports: 13 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Assert

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

func Debug

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

func Error

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

func Info

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

func InitLog added in v0.7.0

func InitLog(logLevel string, timeFmt string, colored bool, appName string, splitEnable bool, splitSize int64)

InitLog create a root logger. it will write to console and multiple file by level. note: default set root logger level is info it provides custom log with CustomizeFiles,if it match any caller's name ,log's level will be setting debug and output

func SetGlobalLevel added in v0.7.0

func SetGlobalLevel(strLevel string)

SetGlobalLevel sets the global override for log level. If this values is raised, all Loggers will use at least this value.

To globally disable logs, set zerolog.GlobalLevel to Disabled.

func Warn

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

Types

type FileLevelWriter added in v0.9.0

type FileLevelWriter struct {
	*os.File
	// contains filtered or unexported fields
}

func (*FileLevelWriter) WriteLevel added in v0.9.0

func (lw *FileLevelWriter) WriteLevel(level zerolog.Level, p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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