Documentation
¶
Index ¶
- Variables
- func Debugf(format string, v ...interface{})
- func Errorf(format string, v ...interface{})
- func Fatalf(format string, v ...interface{})
- func Infof(format string, v ...interface{})
- func IsEnabled(lvl LogLevel) bool
- func LazyDebug(fn func() string)
- func LazyDebugf(fmt string, fns ...func() string)
- func LazyTrace(fn func() string)
- func LazyTracef(fmt string, fns ...func() string)
- func LazyVerbose(fn func() string)
- func LazyVerbosef(fmt string, fns ...func() string)
- func PeriodicProfile(level LogLevel, port string, endpoints ...string)
- func Profile(port string, endpoints ...string) string
- func SetLogLevel(to LogLevel)
- func SetLogWriter(w io.Writer)
- func StackTrace() string
- func Tracef(format string, v ...interface{})
- func Verbosef(format string, v ...interface{})
- func Warnf(format string, v ...interface{})
- type Ender
- type LogLevel
- type Logger
Constants ¶
This section is empty.
Variables ¶
View Source
var SystemLogger destination
The default logger
Functions ¶
func Errorf ¶
func Errorf(format string, v ...interface{})
Errorf to log message and warning messages will be logged.
func Fatalf ¶
func Fatalf(format string, v ...interface{})
Fatalf to log message and warning messages will be logged.
func LazyDebug ¶
func LazyDebug(fn func() string)
Run function only if output will be logged at debug level
func LazyDebugf ¶
Run function only if output will be logged at debug level Only %v is allowable in format string
func LazyTrace ¶
func LazyTrace(fn func() string)
Run function only if output will be logged at trace level
func LazyTracef ¶
Run function only if output will be logged at trace level Only %v is allowable in format string
func LazyVerbose ¶
func LazyVerbose(fn func() string)
Run function only if output will be logged at verbose level
func LazyVerbosef ¶
Run function only if output will be logged at verbose level Only %v is allowable in format string
func PeriodicProfile ¶
Dump profiling info periodically
Types ¶
type Logger ¶
type Logger interface { // Warnings, logged by default. Warnf(format string, v ...interface{}) // Errors, logged by default. Errorf(format string, v ...interface{}) // Fatal errors. Will not terminate execution. Fatalf(format string, v ...interface{}) // Informational messages. Infof(format string, v ...interface{}) // Verbose messages like request logging Verbosef(format string, v ...interface{}) // Get stack trace StackTrace() string // Timing utility Timer(format string, v ...interface{}) Ender // Debugging messages Debugf(format string, v ...interface{}) // Program execution Tracef(format string, v ...interface{}) // Call and print the stringer if verbose enabled LazyVerbose(fn func() string) // Call and print the stringer if debugging enabled LazyDebug(fn func() string) // Call and print the stringer if tracing enabled LazyTrace(fn func() string) }
Logger interface
Click to show internal directories.
Click to hide internal directories.