clog

package
v0.0.0-...-517e680 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2023 License: LGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Clog

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

Clog 日志内部调试实现

func NewLogger

func NewLogger(prefix string) Clog

NewLogger 创建一个新的日志,采用指定prefix前缀

func (Clog) Critical

func (sf Clog) Critical(format string, v ...interface{})

Critical Log CRITICAL level message.

func (Clog) Debug

func (sf Clog) Debug(format string, v ...interface{})

Debug Log DEBUG level message.

func (Clog) Error

func (sf Clog) Error(format string, v ...interface{})

Error Log ERROR level message.

func (*Clog) LogMode

func (sf *Clog) LogMode(enable bool)

LogMode set enable or disable log output when you has set provider

func (*Clog) SetLogProvider

func (sf *Clog) SetLogProvider(p LogProvider)

SetLogProvider set provider provider

func (Clog) Warn

func (sf Clog) Warn(format string, v ...interface{})

Warn Log WARN level message.

type LogProvider

type LogProvider interface {
	Critical(format string, v ...interface{})
	Error(format string, v ...interface{})
	Warn(format string, v ...interface{})
	Debug(format string, v ...interface{})
}

LogProvider RFC5424 log message levels only Debug Warn and Error

Jump to

Keyboard shortcuts

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