Documentation ¶
Overview ¶
Package logging provides a simple logger interface and implementations
Index ¶
- Constants
- Variables
- type BasicLogger
- func (l BasicLogger) Critical(v ...interface{})
- func (l BasicLogger) Debug(v ...interface{})
- func (l BasicLogger) Debugf(format string, v ...interface{})
- func (l BasicLogger) Error(v ...interface{})
- func (l BasicLogger) Errorf(format string, v ...interface{})
- func (l BasicLogger) Fatal(v ...interface{})
- func (l BasicLogger) Fatalf(format string, v ...interface{})
- func (l BasicLogger) Info(v ...interface{})
- func (l BasicLogger) Infof(format string, v ...interface{})
- func (l BasicLogger) Print(v ...interface{})
- func (l BasicLogger) Printf(format string, v ...interface{})
- func (l BasicLogger) Println(v ...interface{})
- func (l BasicLogger) Warnf(format string, v ...interface{})
- func (l BasicLogger) Warning(v ...interface{})
- type Logger
Constants ¶
View Source
const ( // LEVEL_DEBUG = 0 LEVEL_DEBUG = iota // LEVEL_INFO = 1 LEVEL_INFO // LEVEL_WARNING = 2 LEVEL_WARNING // LEVEL_ERROR = 3 LEVEL_ERROR // LEVEL_CRITICAL = 4 LEVEL_CRITICAL )
Variables ¶
Functions ¶
This section is empty.
Types ¶
type BasicLogger ¶
func (BasicLogger) Critical ¶
func (l BasicLogger) Critical(v ...interface{})
Critical logs a message using CRITICAL as log level.
func (BasicLogger) Debug ¶
func (l BasicLogger) Debug(v ...interface{})
Debug logs a message using DEBUG as log level.
func (BasicLogger) Debugf ¶
func (l BasicLogger) Debugf(format string, v ...interface{})
func (BasicLogger) Error ¶
func (l BasicLogger) Error(v ...interface{})
Error logs a message using ERROR as log level.
func (BasicLogger) Errorf ¶
func (l BasicLogger) Errorf(format string, v ...interface{})
func (BasicLogger) Fatal ¶
func (l BasicLogger) Fatal(v ...interface{})
Fatal is equivalent to l.Critical(fmt.Sprint()) followed by a call to os.Exit(1).
func (BasicLogger) Fatalf ¶
func (l BasicLogger) Fatalf(format string, v ...interface{})
func (BasicLogger) Info ¶
func (l BasicLogger) Info(v ...interface{})
Info logs a message using INFO as log level.
func (BasicLogger) Infof ¶
func (l BasicLogger) Infof(format string, v ...interface{})
func (BasicLogger) Print ¶
func (l BasicLogger) Print(v ...interface{})
func (BasicLogger) Printf ¶
func (l BasicLogger) Printf(format string, v ...interface{})
func (BasicLogger) Println ¶
func (l BasicLogger) Println(v ...interface{})
func (BasicLogger) Warnf ¶
func (l BasicLogger) Warnf(format string, v ...interface{})
func (BasicLogger) Warning ¶
func (l BasicLogger) Warning(v ...interface{})
Warning logs a message using WARNING as log level.
type Logger ¶
type Logger interface { Debug(v ...interface{}) Info(v ...interface{}) Warning(v ...interface{}) Error(v ...interface{}) Critical(v ...interface{}) Fatal(v ...interface{}) // Log with format Debugf(format string, v ...interface{}) Infof(format string, v ...interface{}) Warnf(format string, v ...interface{}) Errorf(format string, v ...interface{}) Fatalf(format string, v ...interface{}) // Implement StdLogger Printf(format string, v ...interface{}) Print(v ...interface{}) Println(v ...interface{}) }
Logger collects logging information at several levels
Click to show internal directories.
Click to hide internal directories.