Documentation ¶
Index ¶
- Constants
- Variables
- func Debug(s string, v ...interface{})
- func Error(s string, v ...interface{})
- func Fatal(v ...interface{})
- func Fatalf(format string, v ...interface{})
- func Fatalln(v ...interface{})
- func Info(s string, v ...interface{})
- func Msg(v ...interface{})
- func Msgf(s string, v ...interface{})
- func New(out io.Writer, logLevel LogLevel, colorful bool) *logger
- func NewWithPrefix(out io.Writer, logLevel LogLevel, colorful bool, prefix string) *logger
- func Panic(v ...interface{})
- func Panicf(format string, v ...interface{})
- func Panicln(v ...interface{})
- func Print(v ...interface{})
- func Printf(format string, v ...interface{})
- func Println(v ...interface{})
- func SetPrefix(prefix string)
- func Warn(s string, v ...interface{})
- type LogLevel
Constants ¶
const ( Reset = "\033[0m" Red = "\033[31m" Green = "\033[32m" Yellow = "\033[33m" Blue = "\033[34m" Magenta = "\033[35m" Cyan = "\033[36m" White = "\033[37m" BlueBold = "\033[34;1m" MagentaBold = "\033[35;1m" RedBold = "\033[31;1m" YellowBold = "\033[33;1m" )
const IsoZonedDateTime = "2006-01-02 15:04:05"
Variables ¶
var ( Discard = New(ioutil.Discard, DebugLevel, false) DefaultLogger = New(os.Stderr, DebugLevel, true) )
Functions ¶
func Fatal ¶
func Fatal(v ...interface{})
Fatal is equivalent to Print() followed by a call to os.Exit(1).
func Fatalf ¶
func Fatalf(format string, v ...interface{})
Fatalf is equivalent to Printf() followed by a call to os.Exit(1).
func Fatalln ¶
func Fatalln(v ...interface{})
Fatalln is equivalent to Println() followed by a call to os.Exit(1).
func NewWithPrefix ¶
func Panic ¶
func Panic(v ...interface{})
Panic is equivalent to Print() followed by a call to panic().
func Panicf ¶
func Panicf(format string, v ...interface{})
Panicf is equivalent to Printf() followed by a call to panic().
func Panicln ¶
func Panicln(v ...interface{})
Panicln is equivalent to Println() followed by a call to panic().
func Print ¶
func Print(v ...interface{})
Print calls Output to print to the standard logger. Arguments are handled in the manner of fmt.Print.
func Printf ¶
func Printf(format string, v ...interface{})
Printf calls Output to print to the standard logger. Arguments are handled in the manner of fmt.Printf.
func Println ¶
func Println(v ...interface{})
Println calls Output to print to the standard logger. Arguments are handled in the manner of fmt.Println.