Documentation ¶
Overview ¶
Package commonlog defines interfaces for common logging interactions, with an emphasis on Syslog level compatibility
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LevelLogger ¶
LevelLogger is an interface containing a single method that logs a message and context/formatting values to a specified a level
type Logger ¶
type Logger interface { LevelLogger Emergency(string, ...interface{}) Alert(string, ...interface{}) Critical(string, ...interface{}) Error(string, ...interface{}) Warning(string, ...interface{}) Notice(string, ...interface{}) Info(string, ...interface{}) Debug(string, ...interface{}) }
A Logger defines the method set for a common logging implementation, with methods defined for each standard log level as defined in package level
func NewLogger ¶
func NewLogger(l LevelLogger) Logger
NewLogger creates a new Logger instance from a LevelLogger by using a common pass-through pattern for each separate level-specific logging method to the passed LevelLogger.Log() method
Directories ¶
Path | Synopsis |
---|---|
Package adapter defines a common interface for adapters to implement the commonlog.Logger with a self-awareness
|
Package adapter defines a common interface for adapters to implement the commonlog.Logger with a self-awareness |
builtin
Package builtin defines an adapter using the built-in "log" package
|
Package builtin defines an adapter using the built-in "log" package |
glog
Package glog defines an adapter using the google "glog" package
|
Package glog defines an adapter using the google "glog" package |
iowriter
Package iowriter defines an adapter that uses the io.Writer interface
|
Package iowriter defines an adapter that uses the io.Writer interface |
levelprefixed
Package levelprefixed defines a delegate adapter that prefixes messages with the log's severity level
|
Package levelprefixed defines a delegate adapter that prefixes messages with the log's severity level |
logging
Package logging defines an adapter using the popular "go-logging" package
|
Package logging defines an adapter using the popular "go-logging" package |
Package level defines the standard levels and their validations
|
Package level defines the standard levels and their validations |
Click to show internal directories.
Click to hide internal directories.