clog

package module
v0.0.0-...-2a1b6e6 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2018 License: MIT Imports: 3 Imported by: 3

README

go-cli-colorlog

Print colorful log info in cli

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Color = struct {
	Emerg  ct.Color
	Alert  ct.Color
	Crit   ct.Color
	Error  ct.Color
	Warn   ct.Color
	Notice ct.Color
	Info   ct.Color
	Debug  ct.Color
	Output ct.Color
}{
	ct.Red,
	ct.Red,
	ct.Red,
	ct.Red,
	ct.Yellow,
	ct.Magenta,
	ct.Green,
	ct.Cyan,
	ct.Cyan,
}
View Source
var Prefix = struct {
	Emerg  string
	Alert  string
	Crit   string
	Error  string
	Warn   string
	Notice string
	Info   string
	Debug  string
	Output string
}{
	"[EMERG] ",
	"[ALERT] ",
	"[CRIT] ",
	"[ERR] ",
	"[WARN] ",
	"[NOTICE] ",
	"[INFO] ",
	"[DEBUG] ",
	">> ",
}
View Source
var PrintPriority = LOG_DEBUG
View Source
var PrintToLogger = false

Functions

func PrintAlert

func PrintAlert(ft string, args ...interface{})

func PrintCrit

func PrintCrit(ft string, args ...interface{})

func PrintDebug

func PrintDebug(ft string, args ...interface{})

func PrintEmerg

func PrintEmerg(ft string, args ...interface{})

func PrintError

func PrintError(ft string, args ...interface{})

func PrintInfo

func PrintInfo(ft string, args ...interface{})

func PrintLog

func PrintLog(priority LogPriority, ft string, args ...interface{})

func PrintNotice

func PrintNotice(ft string, args ...interface{})

func PrintOutput

func PrintOutput(ft string, args ...interface{})

func PrintWarn

func PrintWarn(ft string, args ...interface{})

func Println

func Println(color ct.Color, prefix string, ft string, args ...interface{})

Types

type LogPriority

type LogPriority int
const (
	LOG_EMERG LogPriority = iota
	LOG_ALERT
	LOG_CRIT
	LOG_ERR
	LOG_WARNING
	LOG_NOTICE
	LOG_INFO
	LOG_DEBUG
)

Jump to

Keyboard shortcuts

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