roll_file

package
v1.10.1 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

file 使用文件方式记录日志

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(ctx context.Context, fileName string, maxLevel logger.Level) logger.Logger

func NewWithoutFlag

func NewWithoutFlag(ctx context.Context, fileName string, maxLevel logger.Level) logger.Logger

Types

type FileLogger

type FileLogger struct {
	Logger   *log.Logger
	MaxLevel logger.Level
	// contains filtered or unexported fields
}

func (*FileLogger) CanLog

func (l *FileLogger) CanLog(level logger.Level) bool

func (*FileLogger) Log

func (l *FileLogger) Log(level logger.Level, format string, params ...any)

func (*FileLogger) LogAlter

func (l *FileLogger) LogAlter(format string, params ...any)

func (*FileLogger) LogCrit

func (l *FileLogger) LogCrit(format string, params ...any)

func (*FileLogger) LogDebug

func (l *FileLogger) LogDebug(format string, params ...any)

func (*FileLogger) LogEmerg

func (l *FileLogger) LogEmerg(format string, params ...any)

func (*FileLogger) LogError

func (l *FileLogger) LogError(format string, params ...any)

func (*FileLogger) LogInfo

func (l *FileLogger) LogInfo(format string, params ...any)

func (*FileLogger) LogNotice

func (l *FileLogger) LogNotice(format string, params ...any)

func (*FileLogger) LogWarning

func (l *FileLogger) LogWarning(format string, params ...any)

func (*FileLogger) SetOutput

func (l *FileLogger) SetOutput(out io.Writer)

Jump to

Keyboard shortcuts

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