Documentation ¶
Index ¶
- Constants
- type Logger
- func (l *Logger) Configure(logLevel string) error
- func (l Logger) Configured() bool
- func (l Logger) Error(message interface{})
- func (l Logger) Info(message interface{})
- func (l *Logger) Init(traceHandle io.Writer, infoHandle io.Writer, warningHandle io.Writer, ...)
- func (l Logger) Level() string
- func (l Logger) Trace(message interface{})
- func (l Logger) Warning(message interface{})
Constants ¶
View Source
const ( TraceLVL = "trace" InfoLVL = "info" WarningLVL = "warning" ErrorLVL = "error" )
log levels
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
Logger type contains methods for logging
func (Logger) Configured ¶
Configured returns the status of the logger
func (Logger) Error ¶
func (l Logger) Error(message interface{})
Error prints error logs if they are enabled
func (Logger) Info ¶
func (l Logger) Info(message interface{})
Info prints info logs if they are enabled
func (*Logger) Init ¶
func (l *Logger) Init( traceHandle io.Writer, infoHandle io.Writer, warningHandle io.Writer, errorHandle io.Writer)
Init takes io.Writers for each type of log level. logger.Configure() should be used unless you have very specific io.Writer requirements
Click to show internal directories.
Click to hide internal directories.