logger

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: May 10, 2025 License: MIT Imports: 10 Imported by: 33

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

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

func GetLogger

func GetLogger(c *config.LogConfig) *Logger

func NewLogger

func NewLogger(config *config.LogConfig) *Logger

func (*Logger) Debug

func (l *Logger) Debug(msg string, fields ...zap.Field)

Debug 输出 Debug 日志

func (*Logger) DebugF

func (l *Logger) DebugF(format string, args ...interface{})

DebugF 格式化后输出 Debug 日志

func (*Logger) Error

func (l *Logger) Error(msg string, fields ...zap.Field)

Error 输出 Error 日志

func (*Logger) ErrorF

func (l *Logger) ErrorF(format string, args ...interface{})

ErrorF 格式化后输出 Error 日志

func (*Logger) Info

func (l *Logger) Info(msg string, fields ...zap.Field)

Info 输出 Info 日志

func (*Logger) InfoF

func (l *Logger) InfoF(format string, args ...interface{})

InfoF 格式化后输出 Info 日志

func (*Logger) Warn

func (l *Logger) Warn(msg string, fields ...zap.Field)

Warn 输出 Warn 日志

func (*Logger) WarnF

func (l *Logger) WarnF(format string, args ...interface{})

WarnF 格式化后输出 Warn 日志

func (*Logger) WithContext

func (l *Logger) WithContext(ctx context.Context) *Logger

Directories

Path Synopsis
Package lumberjack provides a rolling logger.
Package lumberjack provides a rolling logger.

Jump to

Keyboard shortcuts

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