log

package
v0.0.0-...-905ac7b Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// InfoPrefix 信息前缀
	InfoPrefix = "[I] "

	// DebugPrefix 调试前缀
	DebugPrefix = "[D] "

	// WarnPrefix 警告前缀
	WarnPrefix = "[W] "
)

Variables

This section is empty.

Functions

func Debug

func Debug(v ...interface{})

Debug 调试

func Info

func Info(v ...interface{})

Info 信息

func Warn

func Warn(v ...interface{})

Warn 警告

Types

type Level

type Level int

Level 日志级别

const (
	// LogDebug 调试模式
	LogDebug Level = iota

	// LogInfo 日志信息
	LogInfo

	// LogWarn 警告
	LogWarn
)

type Logger

type Logger struct {
	*log.Logger
	// contains filtered or unexported fields
}

Logger 日志结构体

func New

func New(out io.Writer, prefix string, flag int, level Level) *Logger

New 新的日志

func (*Logger) Debug

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

Debug 调试

func (*Logger) Info

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

Info 信息

func (*Logger) Warn

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

Warn 警告

Jump to

Keyboard shortcuts

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