logzero

package
v2.28.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// CallerSkipFrameCount caller skip frame count
	CallerSkipFrameCount = 4
	WriterDefaultLevel   = zerolog.InfoLevel
)

Functions

func Debug

func Debug(s ...interface{})

func Debugf

func Debugf(t string, s ...interface{})

func Error

func Error(s ...interface{})

func Errorf

func Errorf(t string, s ...interface{})

func Fatal

func Fatal(s ...interface{})

func Fatalf

func Fatalf(t string, s ...interface{})

func Info

func Info(s ...interface{})

func Infof

func Infof(t string, s ...interface{})

func NewConsoleOutput

func NewConsoleOutput() zerolog.ConsoleWriter

func SetGlobal

func SetGlobal(l *Logger)

func SetLevel

func SetLevel(level string)

func Warn

func Warn(s ...interface{})

func Warnf

func Warnf(t string, s ...interface{})

func Writer

func Writer() io.Writer

Types

type Logger

type Logger struct {
	*zerolog.Logger
	*logger.Base
	WriterLevel zerolog.Level
	// contains filtered or unexported fields
}

func Default

func Default() *Logger

Default default global logger

func GetLogger

func GetLogger(category string, writers ...io.Writer) *Logger

func New

func New(writers ...io.Writer) *Logger

func NewLogger

func NewLogger(callerSkipFrameCount int, writers ...io.Writer) *Logger

func (*Logger) Debug

func (a *Logger) Debug(s ...interface{})

func (*Logger) Debugf

func (a *Logger) Debugf(t string, s ...interface{})

func (*Logger) Error

func (a *Logger) Error(s ...interface{})

func (*Logger) Errorf

func (a *Logger) Errorf(t string, s ...interface{})

func (*Logger) Fatal

func (a *Logger) Fatal(s ...interface{})

func (*Logger) Fatalf

func (a *Logger) Fatalf(t string, s ...interface{})

func (*Logger) GetLogger

func (a *Logger) GetLogger(category string, writers ...io.Writer) *Logger

func (*Logger) Info

func (a *Logger) Info(s ...interface{})

func (*Logger) Infof

func (a *Logger) Infof(t string, s ...interface{})

func (*Logger) SetLevel

func (a *Logger) SetLevel(level string)

func (*Logger) Warn

func (a *Logger) Warn(s ...interface{})

func (*Logger) Warnf

func (a *Logger) Warnf(t string, s ...interface{})

func (*Logger) Write

func (a *Logger) Write(p []byte) (int, error)

Jump to

Keyboard shortcuts

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