log

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2020 License: MIT Imports: 2 Imported by: 114

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddFileLog

func AddFileLog(name string, lvl Level, file string, rotate bool, daily bool, format string, maxlines int, maxsize int, categorys ...string)

func Close

func Close()

func Critical

func Critical(arg0 interface{}, args ...interface{}) error

func Debug

func Debug(arg0 interface{}, args ...interface{})

func Error

func Error(arg0 interface{}, args ...interface{}) error

func Fine

func Fine(arg0 interface{}, args ...interface{})

func Finest

func Finest(arg0 interface{}, args ...interface{})

func Info

func Info(arg0 interface{}, args ...interface{})

func Log

func Log(lvl Level, source, message string)

func Remove

func Remove(name string)

func SetLevel

func SetLevel(name string, lvl Level)

动态修改log级别

func SetLevelAll

func SetLevelAll(lvl Level)

func Trace

func Trace(arg0 interface{}, args ...interface{})

func Warn

func Warn(arg0 interface{}, args ...interface{}) error

Types

type Level

type Level int
const (
	FINEST Level = iota
	FINE
	DEBUG
	TRACE
	INFO
	WARNING
	ERROR
	CRITICAL
)

func FormatLevel

func FormatLevel(lvl string) (level Level, err error)

Jump to

Keyboard shortcuts

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