Documentation ¶
Overview ¶
Package logger provides collection of loggin functions with colored output and stack frames
Index ¶
- Constants
- Variables
- func Debug(message string, v ...interface{})
- func DisableBTrace()
- func DisableColored()
- func DisableDebug()
- func EnableBTrace()
- func EnableColored()
- func EnableDebug()
- func Error(message string, v ...interface{})
- func ErrorErr(err error) bool
- func Fatal(message string, v ...interface{})
- func FatalErr(err error)
- func Info(message string, v ...interface{})
- func JSONDebug(a interface{})
- func Panic(message string, v ...interface{})
- func PanicRecover()
- func SetFileName(fn int)
- func SetOut(out io.Writer)
- func Warning(message string, v ...interface{})
- func WarningErr(err error) bool
Constants ¶
View Source
const ( // FileNameNo indicates to no print filename FileNameNo int = iota // FileNameShort indicates to print short filename FileNameShort // FileNameLong indicates to print full filename FileNameLong )
Variables ¶
View Source
var ( // InfoPrefix is text prefix for info log InfoPrefix = "INFO" // WarnPrefix is text prefix for warning log WarnPrefix = "WARN" // ErrPrefix is text prefix for error log ErrPrefix = " ERR" // DebugPrefix is text prefix for debug log DebugPrefix = " DEB" )
Functions ¶
func Fatal ¶
func Fatal(message string, v ...interface{})
Fatal prints error log and finish proccess by os.Exit(1)
func SetFileName ¶
func SetFileName(fn int)
SetFileName sets flag for print ceurrent file name in log
func Warning ¶
func Warning(message string, v ...interface{})
Warning prints warning log (yellow if colored)
func WarningErr ¶
WarningErr prints err as warning log and returns true if err!=nil
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.