log

package
v0.0.0-...-4365a35 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2016 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TRASH = iota
	FATAL_N
	ERROR_N
	WARN_N
	INFO_N
	DEBUG_N
)
View Source
const (
	OFF = iota
	ON
)
View Source
const (
	BLACK      = "30m"
	RED        = "31m" //fatal default color
	GREEN      = "32m" //info default color
	YELLO      = "33m" //warn default color
	BLUE       = "34m" //debug default color
	PURPLE_RED = "35m" //error default color
	CYAN_BLUE  = "36m"
	WHITE      = "37m"

	LOG_START = "\033[1;0;"
	LOG_END   = "\033[0m"

	DEBUG = LOG_START + BLUE
	INFO  = LOG_START + GREEN
	WARN  = LOG_START + YELLO
	ERROR = LOG_START + PURPLE_RED
	FATAL = LOG_START + RED
)

Variables

View Source
var FILE_LEVEL = DEBUG_N
View Source
var LOG_LEVEL = DEBUG_N

Functions

func Debug

func Debug(data ...interface{})

func DebugNoLine

func DebugNoLine(data ...interface{})

func DebugNoStyle

func DebugNoStyle(data ...interface{})

func DebugOff

func DebugOff()

func DebugOn

func DebugOn()

func DebugTo

func DebugTo(write io.Writer, data ...interface{})

func Error

func Error(data ...interface{})

func ErrorNoLine

func ErrorNoLine(data ...interface{})

func ErrorNoStyle

func ErrorNoStyle(data ...interface{})

func ErrorOff

func ErrorOff()

func ErrorOn

func ErrorOn()

func ErrorTo

func ErrorTo(write io.Writer, data ...interface{})

func Fatal

func Fatal(data ...interface{})

func FatalNoLine

func FatalNoLine(data ...interface{})

func FatalNoStyle

func FatalNoStyle(data ...interface{})

func FatalOff

func FatalOff()

func FatalOn

func FatalOn()

func FatalTo

func FatalTo(write io.Writer, data ...interface{})

func FileLine

func FileLine() string

func Format

func Format(data ...interface{}) string

func GetDebugStatus

func GetDebugStatus() bool

func GetErrorStatus

func GetErrorStatus() bool

func GetFatalStatus

func GetFatalStatus() bool

func GetInfoStatus

func GetInfoStatus() bool

func GetStatus

func GetStatus() bool

func GetWarnStatus

func GetWarnStatus() bool

func Info

func Info(data ...interface{})

func InfoNoLine

func InfoNoLine(data ...interface{})

func InfoNoStyle

func InfoNoStyle(data ...interface{})

func InfoOff

func InfoOff()

func InfoOn

func InfoOn()

func InfoTo

func InfoTo(write io.Writer, data ...interface{})

func Off

func Off()

func On

func On()

func SetFile

func SetFile(file *os.File)

func Time

func Time() string

func Warn

func Warn(data ...interface{})

func WarnNoLine

func WarnNoLine(data ...interface{})

func WarnNoStyle

func WarnNoStyle(data ...interface{})

func WarnOff

func WarnOff()

func WarnOn

func WarnOn()

func WarnTo

func WarnTo(write io.Writer, data ...interface{})

func Write

func Write(data string) (int, error)

func WriteForStatus

func WriteForStatus(write io.Writer, data string, status bool) (int, error)

func WriteTo

func WriteTo(write io.Writer, data string) (int, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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