logging

package
v1.0.32 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GetLogger = defaultLoggerContainer.GetLogger
View Source
var SetLoggerLevel = defaultLoggerContainer.SetLevel

Functions

This section is empty.

Types

type CloserFunc

type CloserFunc func() error

type DynamicEncoder

type DynamicEncoder struct {
	zapcore.Encoder
}

func NewDynamicEncoder

func NewDynamicEncoder() *DynamicEncoder

func (*DynamicEncoder) Dup

func (dynamic *DynamicEncoder) Dup() *DynamicEncoder

type DynamicWriteSyncer

type DynamicWriteSyncer struct {
	zapcore.WriteSyncer
	// contains filtered or unexported fields
}

func NewDynamicWriteSyncer

func NewDynamicWriteSyncer() *DynamicWriteSyncer

func (*DynamicWriteSyncer) Dup

func (dynamic *DynamicWriteSyncer) Dup() *DynamicWriteSyncer

func (*DynamicWriteSyncer) UseCustom

func (dynamic *DynamicWriteSyncer) UseCustom(writeSyncer zapcore.WriteSyncer, closer CloserFunc) error

func (*DynamicWriteSyncer) UseCustomFileWriteSyncer

func (dynamic *DynamicWriteSyncer) UseCustomFileWriteSyncer(path string, maxSize, maxAge, maxBackups int, localTime, compress bool) error

func (*DynamicWriteSyncer) UseCustomWriteCloser

func (dynamic *DynamicWriteSyncer) UseCustomWriteCloser(wc io.WriteCloser) error

func (*DynamicWriteSyncer) UseCustomWriter

func (dynamic *DynamicWriteSyncer) UseCustomWriter(w io.Writer) error

func (*DynamicWriteSyncer) UseFileWriteSyncer

func (dynamic *DynamicWriteSyncer) UseFileWriteSyncer(path string) error

type LoggerContainer

type LoggerContainer struct {
	*DynamicEncoder
	*DynamicWriteSyncer
	zap.AtomicLevel
	// contains filtered or unexported fields
}

func NewLoggerContainer

func NewLoggerContainer(encoder *DynamicEncoder, writeSyncer *DynamicWriteSyncer, level zapcore.Level) (container *LoggerContainer)

func (*LoggerContainer) GetLogger

func (container *LoggerContainer) GetLogger() *zap.Logger

type LoggerCreator

type LoggerCreator struct {
	*DynamicWriteSyncer
	*DynamicEncoder
	zap.AtomicLevel
}

func NewLoggerCreator

func NewLoggerCreator() *LoggerCreator

func (*LoggerCreator) Dup

func (creator *LoggerCreator) Dup() *LoggerCreator

func (*LoggerCreator) NewLogger

func (creator *LoggerCreator) NewLogger() *zap.Logger

func (*LoggerCreator) NewLoggerContainer

func (creator *LoggerCreator) NewLoggerContainer() *LoggerContainer

func (*LoggerCreator) NewStaticLogger

func (creator *LoggerCreator) NewStaticLogger() *zap.Logger

func (*LoggerCreator) WithLevel

func (creator *LoggerCreator) WithLevel(level zapcore.Level) *LoggerCreator

Jump to

Keyboard shortcuts

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