Documentation ¶
Overview ¶
Package logger is a simple but customizable logger used by ratchet.
Index ¶
Constants ¶
const ( LevelDebug = iota LevelInfo LevelError LevelStatus LevelSilent )
Variables ¶
var LogLevel = LevelInfo
LogLevel can be set to one of: logger.LevelDebug, logger.LevelInfo, logger.LevelError, logger.LevelStatus, or logger.LevelSilent
Functions ¶
func Debug ¶
func Debug(v ...interface{})
Debug logs output when LogLevel is set to at least Debug level
func Error ¶
func Error(v ...interface{})
Error logs output when LogLevel is set to at least Error level
func ErrorWithoutTrace ¶
func ErrorWithoutTrace(v ...interface{})
ErrorWithoutTrace logs output when LogLevel is set to at least Error level but doesn't send the stack trace to Notifier. This is useful only when using a RatchetNotifier implementation.
func Info ¶
func Info(v ...interface{})
Info logs output when LogLevel is set to at least Info level
func SetLogfile ¶
func SetLogfile(filepath string)
SetLogfile can be used to log to a file as well as Stdoud.
Types ¶
type RatchetNotifier ¶
RatchetNotifier is an interface for receiving log events. See the Notifier variable.
var Notifier RatchetNotifier
RatchetNotifier can be set to receive log events in your external implementation code. Useful for doing custom alerting, etc.