ezLogzero

package
v0.0.0-...-77ac295 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Log

type Log struct {
	// contains filtered or unexported fields
}

func NewLogger

func NewLogger(opts ...LogOption) (*Log, error)

func (*Log) Debug

func (l *Log) Debug() *zerolog.Event

func (*Log) DebugP

func (l *Log) DebugP(prefix map[string]interface{}) *zerolog.Event

func (*Log) Error

func (l *Log) Error() *zerolog.Event

func (*Log) ErrorP

func (l *Log) ErrorP(prefix map[string]interface{}) *zerolog.Event

func (*Log) Fatal

func (l *Log) Fatal() *zerolog.Event

func (*Log) FatalP

func (l *Log) FatalP(prefix map[string]interface{}) *zerolog.Event

func (*Log) Info

func (l *Log) Info() *zerolog.Event

func (*Log) InfoP

func (l *Log) InfoP(prefix map[string]interface{}) *zerolog.Event

func (*Log) Panic

func (l *Log) Panic() *zerolog.Event

func (*Log) PanicP

func (l *Log) PanicP(prefix map[string]interface{}) *zerolog.Event

func (*Log) Trace

func (l *Log) Trace() *zerolog.Event

func (*Log) TraceP

func (l *Log) TraceP(prefix map[string]interface{}) *zerolog.Event

func (*Log) Warn

func (l *Log) Warn() *zerolog.Event

func (*Log) WarnP

func (l *Log) WarnP(prefix map[string]interface{}) *zerolog.Event

func (*Log) Writer

func (l *Log) Writer() *zerolog.Logger

type LogOption

type LogOption func(o *logOptions)

func WithCaller

func WithCaller() LogOption

func WithCustomMsgKey

func WithCustomMsgKey(k string) LogOption

func WithCustomTimeKey

func WithCustomTimeKey(k string) LogOption

func WithGlobalPrefix

func WithGlobalPrefix(prefix map[string]interface{}) LogOption

func WithLevelDebug

func WithLevelDebug() LogOption

func WithLevelError

func WithLevelError() LogOption

func WithLevelFatal

func WithLevelFatal() LogOption

func WithLevelInfo

func WithLevelInfo() LogOption

func WithLevelPanic

func WithLevelPanic() LogOption

func WithLevelTrace

func WithLevelTrace() LogOption

func WithLevelWarn

func WithLevelWarn() LogOption

func WithLogUnixTimestamp

func WithLogUnixTimestamp() LogOption

func WithOutputFilePath

func WithOutputFilePath(path string, filename string) LogOption

func WithOutputFileRotate

func WithOutputFileRotate(maxSize int, maxAge int, maxBackup int, compressEnable bool) LogOption

func WithPrefixTimestamp

func WithPrefixTimestamp(k string) LogOption

Jump to

Keyboard shortcuts

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