log

package
v0.0.0-...-0454926 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LevelConfigPath = "logger.level"
	PathConfigPath  = "logger.path"
)

Variables

This section is empty.

Functions

func Debugf

func Debugf(ctx context.Context, format string, v ...any)

func Errorf

func Errorf(ctx context.Context, format string, v ...any)

func Fatalf

func Fatalf(ctx context.Context, format string, v ...any)

func Infof

func Infof(ctx context.Context, format string, v ...any)

func Panicf

func Panicf(ctx context.Context, format string, v ...any)

func Warnf

func Warnf(ctx context.Context, format string, v ...any)

Types

type Logger

type Logger struct {
	// contains filtered or unexported fields
}
var (
	DefaultLogger *Logger
)

func (*Logger) Debugf

func (l *Logger) Debugf(ctx context.Context, format string, v ...any)

func (*Logger) Errorf

func (l *Logger) Errorf(ctx context.Context, format string, v ...any)

func (*Logger) Fatalf

func (l *Logger) Fatalf(ctx context.Context, format string, v ...any)

func (*Logger) Infof

func (l *Logger) Infof(ctx context.Context, format string, v ...any)

func (*Logger) Panicf

func (l *Logger) Panicf(ctx context.Context, format string, v ...any)

func (*Logger) Warnf

func (l *Logger) Warnf(ctx context.Context, format string, v ...any)

type ReopenableWriteSyncer

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

ReopenableWriteSyncer

func NewReopenableWriteSyncer

func NewReopenableWriteSyncer(path string) (*ReopenableWriteSyncer, error)

NewReopenableWriteSyncer

func (*ReopenableWriteSyncer) Reload

func (ws *ReopenableWriteSyncer) Reload() error

Reload

func (*ReopenableWriteSyncer) Sync

func (ws *ReopenableWriteSyncer) Sync() error

sync调用时,需要明确的指定获取当前文件句柄同步

func (*ReopenableWriteSyncer) Write

func (ws *ReopenableWriteSyncer) Write(p []byte) (n int, err error)

Write

Jump to

Keyboard shortcuts

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