Documentation ¶
Index ¶
- func Crit(msg string, ctx ...interface{})
- func Critf(format string, args ...interface{})
- func Debug(msg string, ctx ...interface{})
- func Debugf(format string, args ...interface{})
- func Error(msg string, ctx ...interface{})
- func Errorf(format string, args ...interface{})
- func GetStack() string
- func Info(msg string, ctx ...interface{})
- func Infof(format string, args ...interface{})
- func Pretty(input interface{}) string
- func Warn(msg string, ctx ...interface{})
- func Warnf(format string, args ...interface{})
- type Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Crit ¶
func Crit(msg string, ctx ...interface{})
Crit logs a message (with optional context) at the CRITICAL log level
func Critf ¶
func Critf(format string, args ...interface{})
Critf logs at the CRITICAL log level using a standard printf format string
func Debug ¶
func Debug(msg string, ctx ...interface{})
Debug logs a message (with optional context) at the DEBUG log level
func Debugf ¶
func Debugf(format string, args ...interface{})
Debugf logs at the DEBUG log level using a standard printf format string
func Error ¶
func Error(msg string, ctx ...interface{})
Error logs a message (with optional context) at the ERROR log level
func Errorf ¶
func Errorf(format string, args ...interface{})
Errorf logs at the ERROR log level using a standard printf format string
func GetStack ¶
func GetStack() string
GetStack will convert the Go stack into a string suitable for logging
func Info ¶
func Info(msg string, ctx ...interface{})
Info logs a message (with optional context) at the INFO log level
func Infof ¶
func Infof(format string, args ...interface{})
Infof logs at the INFO log level using a standard printf format string
func Pretty ¶
func Pretty(input interface{}) string
Pretty will attempt to convert any Go structure into a string suitable for logging
Types ¶
type Logger ¶
type Logger interface { Debug(msg string, ctx ...interface{}) Info(msg string, ctx ...interface{}) Warn(msg string, ctx ...interface{}) Error(msg string, ctx ...interface{}) Crit(msg string, ctx ...interface{}) }
Logger is the main logging interface
var Log Logger
Log contains the logger used by all the logging functions