clog

package
v0.0.0-...-1e858a6 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2022 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ClogChan chan *clogChanData = make(chan *clogChanData, 100)

ClogChan 日志通道

Functions

This section is empty.

Types

type Clogger

type Clogger interface {
	Debug(msg string, v ...interface{})
	Info(msg string, v ...interface{})
	Warn(msg string, v ...interface{})
	Error(msg string, v ...interface{})
	Close()
}

Clogger interface类型

type LogLevel

type LogLevel uint8

LogLevel 日志级别类型

const (
	Invalid LogLevel = iota
	DEBUG
	INFO
	WARGING
	ERROR
)

type Logger

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

Logger 日志类型

func NewConsoleLogger

func NewConsoleLogger(level string) *Logger

cLogger构造方法; out日志输出位置,level日志级别[info,debug,warning,error]

func NewFileLogger

func NewFileLogger(level string, file string) *Logger

cLogger构造方法; out日志输出位置, level日志级别[info,debug,warning,error]

func (*Logger) Close

func (l *Logger) Close()

func (*Logger) Debug

func (l *Logger) Debug(msg string, v ...interface{})

show Debug msg

func (*Logger) Error

func (l *Logger) Error(msg string, v ...interface{})

func (*Logger) Info

func (l *Logger) Info(msg string, v ...interface{})

func (*Logger) SetNo

func (l *Logger) SetNo(no int)

SetNo 设置保留日志文件数量

func (*Logger) SetSplitMaxSize

func (l *Logger) SetSplitMaxSize(size int64)

SetSplitMaxSize 切割文件大小

func (*Logger) Warn

func (l *Logger) Warn(msg string, v ...interface{})

Jump to

Keyboard shortcuts

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