Documentation ¶
Overview ¶
slogan is a logger library for Golang.
Index ¶
- Constants
- Variables
- func Alert(log string)
- func AllDone()
- func Critical(log string)
- func Debug(log string)
- func ElapsedTime()
- func Emergency(log string)
- func Error(log string)
- func GetColors() map[int]string
- func GetFormats() map[string]string
- func GetParts() map[string]bool
- func GetTags() [10]string
- func Info(log string)
- func IsTerminal() bool
- func Log(level int, log string)
- func Notice(log string)
- func Runtime()
- func SetColor(mode bool)
- func SetColors(n map[int]string) map[int]string
- func SetExitOnError(mode bool)
- func SetFlags(flag int)
- func SetForceColor(mode bool)
- func SetFormats(n map[string]string) map[string]string
- func SetNoEmpty(mode bool)
- func SetOutput(w io.Writer)
- func SetParts(n map[string]bool) map[string]bool
- func SetPrefix(prefix string) string
- func SetTags(n [10]string) [10]string
- func SetTraceCaller(mode bool)
- func SetVerbosity(level int)
- func SetWarningAsError(mode bool)
- func ShowColors()
- func ShowFormats()
- func ShowParts()
- func ShowTags()
- func Silent(log string)
- func Trace(trace interface{})
- func TraceCall(trace interface{})
- func TraceCall_(trace interface{})
- func Trace_(trace interface{})
- func Warning(log string)
Constants ¶
View Source
const ( Lsilent = 0 Lemergency = 1 Lalert = 2 Lcritical = 3 Lerror = 4 Lwarning = 5 Lnotice = 6 Linfo = 7 Ldebug = 8 Ltrace = 9 )
Contants for log levels
View Source
const ( Ldate = log.Ldate Ltime = log.Ltime Lmicroseconds = log.Lmicroseconds Llongfile = log.Llongfile Lshortfile = log.Lshortfile LUTC = log.LUTC LstdFlags = log.Ldate | log.Ltime )
Contants for legacy log package
Variables ¶
View Source
var CallerBase bool = true
should show only basename of caller
View Source
var Colorize bool = true
should colorize ?
View Source
var ExitOnError bool = false
should exit on error ?
View Source
var ForceColorize bool = false
should colorize even if output is not a terminal ?
View Source
var NoEmpty bool = false
should empty log string logged ?
View Source
var TraceCaller bool = false
should trace caller ?
View Source
var Verbosity int = Lwarning
verbosity
View Source
var WarningAsError bool = false
should warning be error ?
Functions ¶
func ElapsedTime ¶
func ElapsedTime()
Notice Time elapsed since last call to this function or since start otherwise and reset time reference
func SetFormats ¶
Set a new format map and return former map
func SetNoEmpty ¶
func SetNoEmpty(mode bool)
func TraceCall_ ¶
func TraceCall_(trace interface{})
Silent trace and avoid 'declared and not used' build errors
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.