Documentation ¶
Index ¶
- Constants
- Variables
- func Debug(debug interface{})
- func DebugWithData(debug interface{}, data interface{})
- func Debugf(form string, vars ...interface{})
- func Error(err interface{})
- func ErrorWithData(err interface{}, data interface{})
- func Errorf(form string, vars ...interface{})
- func Fatal(fatal interface{})
- func FatalWithData(fatal interface{}, data interface{})
- func Fatalf(form string, vars ...interface{})
- func Info(info interface{})
- func InfoWithData(info interface{}, data interface{})
- func Infof(form string, vars ...interface{})
- func Warn(warn interface{})
- func WarnWithData(warn interface{}, data interface{})
- func Warnf(form string, vars ...interface{})
- type Level
- type LogInstance
- type LoggerInterface
Constants ¶
View Source
const ( // DebugLevel level. Usually only enabled when debugging. Very verbose logging. DEBUG = 0 // InfoLevel level. General operational entries about what's going on inside the // application. INFO = 1 // WarnLevel level. Non-critical entries that deserve eyes. WARN = 2 // ErrorLevel level. Logs. Used for errors that should definitely be noted. // Commonly used for hooks to send errors to an error tracking service. ERROR = 3 // FatalLevel level. Logs and then calls `logger.Exit(1)`. It will exit even if the // logging level is set to Panic. FATAL = 4 )
Variables ¶
View Source
var ( Verbose bool = false Logger []LoggerInterface = []LoggerInterface{&console.Logger{}} Log = &LogInstance{} )
Functions ¶
func DebugWithData ¶ added in v0.0.6
func DebugWithData(debug interface{}, data interface{})
func ErrorWithData ¶ added in v0.0.6
func ErrorWithData(err interface{}, data interface{})
func FatalWithData ¶ added in v0.0.6
func FatalWithData(fatal interface{}, data interface{})
func InfoWithData ¶ added in v0.0.6
func InfoWithData(info interface{}, data interface{})
func WarnWithData ¶ added in v0.0.6
func WarnWithData(warn interface{}, data interface{})
Types ¶
type LogInstance ¶ added in v0.0.6
type LogInstance struct {
Loggers []LoggerInterface
}
func (*LogInstance) LogRunner ¶ added in v0.0.6
func (l *LogInstance) LogRunner(i interface{}, m interface{}, u uint32, b bool)
type LoggerInterface ¶
type LoggerInterface interface { // Log(data, key=value fields, log level, Verbose (Debug)) Log(interface{}, interface{}, uint32, bool) }
The logger interface implements a single function to handle the desired response for the output
Click to show internal directories.
Click to hide internal directories.