log

package
v1.0.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	InfoPrefix  = "[I] "
	DebugPrefix = "[D] "
	WarnPrefix  = "[W] "
)

Variables

This section is empty.

Functions

func Debug

func Debug(v ...interface{})

func Info

func Info(v ...interface{})

func Warn

func Warn(v ...interface{})

Types

type LogLevel

type LogLevel int
const (
	// LogDebug 调试模式
	LogDebug LogLevel = iota

	// Info
	LogInfo

	// Warn
	LogWarn
)

type Logger

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

func New

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

func (*Logger) Debug

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

func (*Logger) Info

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

func (*Logger) Warn

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

Jump to

Keyboard shortcuts

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