Documentation ¶
Index ¶
- Constants
- func Debuga(f func() string)
- func Debugf(fmt string, args ...interface{})
- func Errora(f func() string)
- func Errorf(fmt string, args ...interface{})
- func Fatala(f func() string)
- func Fatalf(fmt string, args ...interface{})
- func Infoa(f func() string)
- func Infof(fmt string, args ...interface{})
- func Loga(level Level, f func() string)
- func Logf(level Level, fmt string, args ...interface{})
- func NewLogger(out io.Writer, lvl Level, fmtLogging LogEntryFormatter, fmtArgs ...interface{}) *goLogger
- func Requesta(rlevel Level, f func() string)
- func Requestf(rlevel Level, fmt string, args ...interface{})
- func SetLevel(level Level)
- func SetLogger(newLogger Logger)
- func Severea(f func() string)
- func Severef(fmt string, args ...interface{})
- func Stackf(level Level, fmt string, args ...interface{})
- func Tracea(f func() string)
- func Tracef(fmt string, args ...interface{})
- func Warna(f func() string)
- func Warnf(fmt string, args ...interface{})
- type ComponentCallback
- type Level
- type LogEntryFormatter
- type Logger
Constants ¶
View Source
const ( NONE = Level(iota) // Disable all logging FATAL // System is in severe error state and has to abort SEVERE // System is in severe error state and cannot recover reliably ERROR // System is in error state but can recover and continue reliably WARN // System approaching error state, or is in a correct but undesirable state INFO // System-level events and status, in correct states REQUEST // Request-level events, with request-specific rlevel TRACE // Trace detailed system execution, e.g. function entry / exit DEBUG // Debug )
View Source
const ( TEXTFORMATTER = LogEntryFormatter(iota) JSONFORMATTER KVFORMATTER UNIFORMFORMATTER )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ComponentCallback ¶
type ComponentCallback func() string
type LogEntryFormatter ¶
type LogEntryFormatter int
type Logger ¶
type Logger interface { // Higher performance Loga(level Level, f func() string) Debuga(f func() string) Tracea(f func() string) Requesta(rlevel Level, f func() string) Infoa(f func() string) Warna(f func() string) Errora(f func() string) Severea(f func() string) Fatala(f func() string) // Printf style Logf(level Level, fmt string, args ...interface{}) Debugf(fmt string, args ...interface{}) Tracef(fmt string, args ...interface{}) Requestf(rlevel Level, fmt string, args ...interface{}) Infof(fmt string, args ...interface{}) Warnf(fmt string, args ...interface{}) Errorf(fmt string, args ...interface{}) Severef(fmt string, args ...interface{}) Fatalf(fmt string, args ...interface{}) /* These APIs control the logging level */ SetLevel(Level) // Set the logging level Level() Level // Get the current logging level }
Logger provides a common interface for logging libraries
Click to show internal directories.
Click to hide internal directories.