logc

package module
v0.0.0-...-42cd7f8 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	White  = "\033[97m"
	Blue   = "\033[34m"
	Green  = "\033[97;32m"
	Yellow = "\033[33m"
	Red    = "\033[31m"
	Reset  = "\033[0m"
	Bold   = "\033[1m"
)

Variables

View Source
var (
	WhiteColor = func(v ...interface{}) string {
		return White + fmt.Sprint(v...) + Reset
	}

	BlueColor = func(v ...interface{}) string {
		return Blue + fmt.Sprint(v...) + Reset
	}

	GreenColor = func(v ...interface{}) string {
		return Green + fmt.Sprint(v...) + Reset
	}

	YellowColor = func(v ...interface{}) string {
		return Yellow + fmt.Sprint(v...) + Reset
	}

	RedColor = func(v ...interface{}) string {
		return Red + fmt.Sprint(v...) + Reset
	}
)
View Source
var (
	ColorMode      = true
	TimeStamp      = true
	ErrorWithPanic = false
	ErrorWithExit  = true
	ColorInBold    = false
	LogLevel       = 9
)
View Source
var (
	TimeFormat    = "[2006-01-02 15:04:05]"
	DefaultFormat = func(v ...interface{}) string {
		return defaultFormat(WhiteColor, v...)
	}
	DebugFormat = func(v ...interface{}) string {
		return defaultFormat(BlueColor, v...)
	}
	ImportantFormat = func(v ...interface{}) string {
		return defaultFormat(GreenColor, v...)
	}
	WarningFormat = func(v ...interface{}) string {
		return defaultFormat(YellowColor, v...)
	}
	ErrorFormat = func(v ...interface{}) string {
		return defaultFormat(RedColor, v...)
	}
)

Functions

func Debug

func Debug(v ...interface{})

func Default

func Default(v ...interface{})

func Error

func Error(v ...interface{})

func GetTime

func GetTime() string

func Important

func Important(v ...interface{})

func Warning

func Warning(v ...interface{})

Types

This section is empty.

Jump to

Keyboard shortcuts

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