log

package
v0.0.0-...-2ca02c3 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2019 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BOLD = "\033[1m"
	DIM  = "\033[2m"

	RED    = "\033[31m"
	GREEN  = "\033[32m"
	BLUE   = "\033[34m"
	YELLOW = "\033[33m"

	FG_BLACK = "\033[30m"
	FG_WHITE = "\033[97m"

	BG_DGRAY  = "\033[100m"
	BG_RED    = "\033[41m"
	BG_GREEN  = "\033[42m"
	BG_YELLOW = "\033[43m"
	BG_LBLUE  = "\033[104m"

	RESET = "\033[0m"
)

https://misc.flogisoft.com/bash/tip_colors_and_formatting

View Source
const (
	DEBUG = iota
	INFO
	IMPORTANT
	WARNING
	ERROR
	FATAL
)

Variables

View Source
var (
	WithColors = true
	Output     = os.Stdout
	DateFormat = "2006-01-02 15:04:05"
	MinLevel   = INFO
)

Functions

func Blue

func Blue(s string) string

func Bold

func Bold(s string) string

func Debug

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

func Dim

func Dim(s string) string

func Error

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

func Fatal

func Fatal(format string, args ...interface{})

func Green

func Green(s string) string

func Important

func Important(format string, args ...interface{})

func Info

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

func Log

func Log(level int, format string, args ...interface{})

func Raw

func Raw(format string, args ...interface{})

func Red

func Red(s string) string

func Warning

func Warning(format string, args ...interface{})

func Wrap

func Wrap(s, effect string) string

func Yellow

func Yellow(s string) string

Types

type Handler

type Handler func(format string, args ...interface{})

Jump to

Keyboard shortcuts

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