Documentation ¶
Index ¶
- Constants
- Variables
- func Debug(format string, a ...interface{})
- func Debugf(format string, a ...interface{})
- func Debugln(a ...interface{})
- func Error(format string, a ...interface{})
- func Errorf(format string, a ...interface{})
- func Errorln(a ...interface{})
- func Fatal(format string, a ...interface{})
- func Fatalf(format string, a ...interface{})
- func Fatalln(a ...interface{})
- func Info(format string, a ...interface{})
- func Infof(format string, a ...interface{})
- func Infoln(a ...interface{})
- func SetColor(colorOn bool)
- func SetErrorWriter(w io.Writer)
- func SetOutputWriter(w io.Writer)
- func SetPrintLevel(level int)
- func Warn(format string, a ...interface{})
- func Warnf(format string, a ...interface{})
- func Warnln(a ...interface{})
Constants ¶
const ( LevelDebug = iota LevelInfo LevelWarn LevelError LevelFatal )
Print levels go in order: Debug, Info, Warn, Error, Fatal
Variables ¶
var Blue = SprintfBlue
Blue creates a blue string
var Green = SprintfGreen
Green creates a green string
var Red = SprintfRed
Red creates a red string
var SprintfBlue = color.New(color.FgHiBlue).SprintfFunc()
SprintfBlue creates a blue formatted string
var SprintfGreen = color.New(color.FgHiGreen).SprintfFunc()
SprintfGreen creates a green formatted string
var SprintfRed = color.New(color.FgHiRed).SprintfFunc()
SprintfRed creates a red formatted string
var SprintfYellow = color.New(color.FgHiYellow).SprintfFunc()
SprintfYellow creates a yellow formatted string
var Yellow = SprintfYellow
Yellow creates a yellow string
Functions ¶
func Debug ¶
func Debug(format string, a ...interface{})
Debug prints a formatted debug level message with a newline appended
func Debugf ¶
func Debugf(format string, a ...interface{})
Debugf prints a formatted debug level message
func Debugln ¶
func Debugln(a ...interface{})
Debugln prints a debug level message with a newline appended
func Error ¶
func Error(format string, a ...interface{})
Error prints a formatted error level message with a newline appended
func Errorf ¶
func Errorf(format string, a ...interface{})
Errorf prints a formatted error level message
func Errorln ¶
func Errorln(a ...interface{})
Errorln prints an error level message with a newline appended
func Fatal ¶
func Fatal(format string, a ...interface{})
Fatal prints a formatted fatal level message with a newline appended and calls os.Exit(1)
func Fatalf ¶
func Fatalf(format string, a ...interface{})
Fatalf prints a formatted fatal level message and calls os.Exit(1)
func Fatalln ¶
func Fatalln(a ...interface{})
Fatalln prints a fatal level message with a newline appended and calls os.Exit(1)
func Info ¶
func Info(format string, a ...interface{})
Info prints a formatted info level message with a newline appended
func Infof ¶
func Infof(format string, a ...interface{})
Infof prints a formatted info level message
func Infoln ¶
func Infoln(a ...interface{})
Infoln prints an info level message with a newline appended
func SetColor ¶ added in v0.1.1
func SetColor(colorOn bool)
SetColor sets the color status. True for color, False for no color
func SetErrorWriter ¶
SetErrorWriter allows you to set the output writer for error and fatal messages
func SetOutputWriter ¶
SetOutputWriter allows you to set the output file for debug, info, and warn messges
func SetPrintLevel ¶ added in v0.2.0
func SetPrintLevel(level int)
SetPrintLevel allows you to set the level to print, by default LevelInfo is set
func Warn ¶
func Warn(format string, a ...interface{})
Warn prints a formatted warning level message with a newline appended
Types ¶
This section is empty.