Documentation
¶
Index ¶
- Constants
- func Loader(config map[string]interface{}) (go2chef.Logger, error)
- type Config
- type Logger
- func (l *Logger) Debugf(dbg int, fmt string, args ...interface{})
- func (l *Logger) Errorf(fmt string, args ...interface{})
- func (l *Logger) Infof(fmt string, args ...interface{})
- func (l *Logger) Name() string
- func (l *Logger) SetDebug(dbg int)
- func (l *Logger) SetLevel(lvl int)
- func (l *Logger) SetName(s string)
- func (l *Logger) Shutdown()
- func (l *Logger) String() string
- func (l *Logger) Type() string
- func (l *Logger) WriteEvent(e *go2chef.Event)
Constants ¶
View Source
const TypeName = "go2chef.logger.stdlib"
TypeName is the name of this logger plugin
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
Config defines the structure of the configuration for this logger. It's separated in this case since the level spec in the configuration file is a string and the internal representation is numeric.
type Logger ¶
type Logger struct {
LoggerName string
// contains filtered or unexported fields
}
Logger represents a logger that just sends output to the default stdlib log library with some level info.
func NewFromLogger ¶
NewFromLogger creates a new instance of the stdlib logger from an existing log.Logger
func (*Logger) Debugf ¶
Debugf writes a message at DEBUG level *if* the debug level is at least as high as the level passed by the caller.
func (*Logger) WriteEvent ¶
WriteEvent writes a formatted event at INFO level
Click to show internal directories.
Click to hide internal directories.