Documentation ¶
Index ¶
Constants ¶
View Source
const ( DEBUG = iota INFO WARNING ERROR )
These constants identify the log levels in order of increasing severity
View Source
const ( // Bits or'ed together to control what's printed. There is no control over the // order they appear (the order listed here) or the format they present (as // described in the comments). A colon appears after these items: // 2009.01.23 01:23:23.123123 /a/b/c/d.go:23: message Ldate = 1 << iota // the date: 2009.01.23 Ltime // the time: 01:23:23 Lmicroseconds // microsecond resolution: 01:23:23.123123. assumes Ltime. Llongfile // full file name and line number: /a/b/c/d.go:23 Lshortfile // final file name element and line number: d.go:23. overrides Llongfile LstdFlags = Ldate | Ltime // initial values for the standard logger )
These flags define which text to prefix to each log entry generated by the Logger.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ILogger ¶
type ILogger interface { Debug(v ...interface{}) Debugf(format string, args ...interface{}) Info(args ...interface{}) Infof(format string, args ...interface{}) Warning(args ...interface{}) Warningf(format string, args ...interface{}) Error(args ...interface{}) Errorf(format string, args ...interface{}) ErrorIfNotNil(message string, err error) }
func GetLoggerFromContext ¶
func New ¶
New creates a new Logger. The out variable sets the destination to which log data will be written. The prefix appears at the beginning of each generated log line. The flag argument defines the logging properties.
func NewDevNullLogger ¶
func NewDevNullLogger() ILogger
Click to show internal directories.
Click to hide internal directories.