Documentation ¶
Overview ¶
Package gosimplelogger implements a simple logging package that includes the notion of logging levels.
Index ¶
- Constants
- Variables
- func Debug(v ...interface{})
- func Debugf(format string, v ...interface{})
- func Error(v ...interface{})
- func Errorf(format string, v ...interface{})
- func Fatal(v ...interface{})
- func Fatalf(format string, v ...interface{})
- func Info(v ...interface{})
- func Infof(format string, v ...interface{})
- func Panic(v ...interface{})
- func Panicf(format string, v ...interface{})
- func Printf(format string, v ...interface{})
- func Println(v ...interface{})
- func Verbose(v ...interface{})
- func Verbosef(format string, v ...interface{})
Constants ¶
const ( // Log Levels. LogPanic = iota LogFatal LogError LogInfo LogVerbose LogDebug )
Variables ¶
var ( // LogLevel is the highest level that will be logged. The // default, LogInfo, means that Info, Error, Fatal, and Panic // log messages will be emitted, but Verbose and Debug messages // will not. LogLevel = LogInfo )
Functions ¶
func Debug ¶
func Debug(v ...interface{})
Debug prints to the verbose logger, but only if LogLevel >= LogDebug. Arguments are handled in the manner of fmt.Println.
func Debugf ¶
func Debugf(format string, v ...interface{})
Debugf prints to the verbose logger, but only if LogLevel >= LogDebug. Arguments are handled in the manner of fmt.Printf.
func Error ¶
func Error(v ...interface{})
Error prints to the error logger (which logs to standard error by default), but only if LogLevel >= LogError. Arguments are handled in the manner of fmt.Println.
func Errorf ¶
func Errorf(format string, v ...interface{})
Errorf prints to the error logger (which logs to standard error by default), but only if LogLevel >= LogError. Arguments are handled in the manner of fmt.Printf.
func Fatal ¶
func Fatal(v ...interface{})
Fatal prints to the error logger (which logs to standard error by default), but only if LogLevel >= LogFatal. Arguments are handled in the manner of fmt.Println. Fatal is equivalent to Error() followed by a call to os.Exit(1).
func Fatalf ¶
func Fatalf(format string, v ...interface{})
Fatalf prints to the error logger (which logs to standard error by default), but only if LogLevel >= LogFatal. Arguments are handled in the manner of fmt.Printf. Fatal is equivalent to Error() followed by a call to os.Exit(1).
func Info ¶
func Info(v ...interface{})
Info prints to the info logger, but only if LogLevel >= LogInfo. Arguments are handled in the manner of fmt.Println.
func Infof ¶
func Infof(format string, v ...interface{})
Infof prints to the info logger, but only if LogLevel >= LogInfo. Arguments are handled in the manner of fmt.Printf.
func Panic ¶
func Panic(v ...interface{})
Panic prints to the error logger (which logs to standard error by default), but only if LogLevel >= LogPanic. Arguments are handled in the manner of fmt.Println. Panic is equivalent to calling Error() followed by a call to panic().
func Panicf ¶
func Panicf(format string, v ...interface{})
Panicf prints to the error logger (which logs to standard error by default), but only if LogLevel >= LogPanic. Arguments are handled in the manner of fmt.Printf. Panicf is equivalent to calling Errorf() followed by a call to panic().
func Printf ¶
func Printf(format string, v ...interface{})
Printf prints to the info logger, but only if LogLevel >= LogInfo. Arguments are handled in the manner of fmt.Printf. Printf simply calls Infof() and is included for compatibility with Go's log.Printf.
func Println ¶
func Println(v ...interface{})
Println prints to the info logger, but only if LogLevel >= LogInfo. Arguments are handled in the manner of fmt.Println. Println simply calls Info() and is included for compatibility with Go's log.Println.
Types ¶
This section is empty.