log

package
v0.0.0-...-2b54507 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2025 License: Apache-2.0 Imports: 10 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(ctx context.Context, msg string)

func Debugf

func Debugf(ctx context.Context, msg string, args ...interface{})

func Error

func Error(ctx context.Context, msg string)

func Errorf

func Errorf(ctx context.Context, msg string, args ...interface{})

func Info

func Info(ctx context.Context, msg string)

func Infof

func Infof(ctx context.Context, msg string, args ...interface{})

func SetDefaultLogger

func SetDefaultLogger(logger *ZapLogger)

func Warn

func Warn(ctx context.Context, msg string)

func Warnf

func Warnf(ctx context.Context, msg string, args ...interface{})

Types

type ZapLogger

type ZapLogger struct {
	Sync func() error
	// contains filtered or unexported fields
}

func GetDefaultLogger

func GetDefaultLogger() *ZapLogger

func InitDefaultLog

func InitDefaultLog(filename string, sentryClient *sentry.Client, devMode ...bool) *ZapLogger

InitDefaultLog 需要在sentry后面初始化,要不sentry会无效

func NewLogger

func NewLogger(filename string, sentryClient *sentry.Client, devMode ...bool) *ZapLogger

func NewLoggerClean

func NewLoggerClean(filename string, sentryClient *sentry.Client, maxSize, maxBackups, maxAge int, compress bool, devMode ...bool) *ZapLogger

func NewLoggerWithConfig

func NewLoggerWithConfig(filename string, sentryClient *sentry.Client, maxSize, maxBackups, maxAge int, compress bool, devMode ...bool) *ZapLogger

func NewZapLogger

func NewZapLogger(encoder zapcore.EncoderConfig, level zap.AtomicLevel, syncer zapcore.WriteSyncer, opts ...zap.Option) *ZapLogger

NewZapLogger return ZapLogger

func NewZapLoggerDevMode

func NewZapLoggerDevMode(encoder zapcore.EncoderConfig, level zap.AtomicLevel, syncer zapcore.WriteSyncer, opts ...zap.Option) *ZapLogger

NewZapLogger return ZapLogger

func (*ZapLogger) Log

func (l *ZapLogger) Log(level log.Level, keyvals ...interface{}) error

Log Implementation of logger interface

Jump to

Keyboard shortcuts

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