Documentation ¶
Overview ¶
Package log provides functions for pretty print
Patterns of functions print:
- Print(), Printf(), Println(): (?time) msg
- Info(), Infof(), Infoln(): (?time) [INFO] msg
- Error(), Errorf(), Errorln(): (?time) [ERR] (?file:line) error
- Fatal(), Fatalf(), Fatalln(): (?time) [FATAL] (?file:line) error
Time pattern: MM.dd.yyyy hh:mm:ss (01.30.2018 05:5:59)
Index ¶
- Variables
- func Error(v ...interface{})
- func Errorf(format string, v ...interface{})
- func Errorln(v ...interface{})
- func Fatal(v ...interface{})
- func Fatalf(format string, v ...interface{})
- func Fatalln(v ...interface{})
- func Info(v ...interface{})
- func Infof(format string, v ...interface{})
- func Infoln(v ...interface{})
- func Print(v ...interface{})
- func PrintColor(b bool)
- func PrintErrorLine(b bool)
- func PrintTime(b bool)
- func Printf(format string, v ...interface{})
- func Println(v ...interface{})
Constants ¶
This section is empty.
Variables ¶
View Source
var ShowTime = PrintTime
ShowTime sets printTime Time isn't printed by default
It was left for backwards compatibility
Functions ¶
func Error ¶
func Error(v ...interface{})
Error prints error Output pattern: (?time) [ERR] (?file:line) error
func Errorf ¶
func Errorf(format string, v ...interface{})
Errorf prints error Output pattern: (?time) [ERR] (?file:line) error
func Errorln ¶
func Errorln(v ...interface{})
Errorln prints error Output pattern: (?time) [ERR] (?file:line) error
func PrintErrorLine ¶ added in v1.1.0
func PrintErrorLine(b bool)
PrintErrorLine sets PrintErrorLine If PrintErrorLine is true, log.Error(), log.Errorf(), log.Errorln() will print file and line, where functions were called. PrintErrorLine is true by default
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.