logger

package
v0.0.0-...-e4de639 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2023 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DebugLevel = _logLevel(zapcore.DebugLevel)
	InfoLevel  = _logLevel(zapcore.InfoLevel)
	WarnLevel  = _logLevel(zapcore.WarnLevel)
	FatalLevel = _logLevel(zapcore.FatalLevel)
)

Variables

This section is empty.

Functions

func Debug

func Debug(v ...any)

func DebugF

func DebugF(format string, v ...any)

DebugF 带格式化的调试日志

func Error

func Error(v ...any)

func ErrorF

func ErrorF(format string, v ...any)

ErrorF 带格式化的错误日志

func Info

func Info(v ...any)

func InfoF

func InfoF(format string, v ...any)

InfoF 带格式化的信息日志

func Warning

func Warning(v ...any)

func WarningF

func WarningF(format string, v ...any)

WarningF 带格式化的警告日志

Types

type FileLogger

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

func New

func New(logPath string, minLogLevel _logLevel) (FileLogger, error)

New creates a new FileLogger.

func (FileLogger) Debug

func (f FileLogger) Debug(v ...interface{})

Debug logs a message at DebugLevel. The message includes any fields passed

func (FileLogger) Debugf

func (f FileLogger) Debugf(format string, v ...interface{})

Debugf logs a message at DebugLevel. The message includes any fields passed

func (FileLogger) Error

func (f FileLogger) Error(v ...interface{})

Error logs a message at ErrorLevel. The message includes any fields passed

func (FileLogger) Errorf

func (f FileLogger) Errorf(format string, v ...interface{})

Errorf logs a message at ErrorLevel. The message includes any fields passed

func (FileLogger) Info

func (f FileLogger) Info(v ...interface{})

Info logs a message at InfoLevel. The message includes any fields passed

func (FileLogger) Infof

func (f FileLogger) Infof(format string, v ...interface{})

Infof logs a message at InfoLevel. The message includes any fields passed

func (FileLogger) Sync

func (f FileLogger) Sync() error

Sync flushes any buffered log entries.

func (FileLogger) Warn

func (f FileLogger) Warn(v ...interface{})

Warn logs a message at WarnLevel. The message includes any fields passed

func (FileLogger) Warnf

func (f FileLogger) Warnf(format string, v ...interface{})

Warnf logs a message at WarnLevel. The message includes any fields passed

Jump to

Keyboard shortcuts

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