log

package
v0.0.0-...-e54033a Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2022 License: GPL-3.0 Imports: 4 Imported by: 8

README

log

an easy to use log library, supporting color, loglevel prefix

Documentation

Index

Constants

View Source
const (
	COLOR_RESET = "\033[0m"
	COLOR_GREEN = "\033[1;32m"
	COLOR_RED   = "\033[1;31m"
	COLOR_PINK  = "\033[1;35m"
)
View Source
const (
	// LVerbose 显示详细日志信息
	LVerbose = 1 << 10
)

Variables

This section is empty.

Functions

func Debug

func Debug(format string, vals ...interface{})

Debug print logging info at level DEBUG, if flag verbose true, filename and lineno will be logged.

func Error

func Error(format string, vals ...interface{})

Error print logging info at level ERROR, if flag verbose true, filename and lineno will be logged.

func Info

func Info(format string, vals ...interface{})

Info print logging info at level INFO, if flag verbose true, filename and lineno will be logged.

func SetFlags

func SetFlags(flags int)

SetFlags 设置log选项

Types

This section is empty.

Jump to

Keyboard shortcuts

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