Documentation ¶
Overview ¶
Package log provides logging utilities for the tracer.
Index ¶
- func Debug(fmt string, a ...interface{})
- func DebugEnabled() bool
- func Error(format string, a ...interface{})
- func Flush()
- func Info(fmt string, a ...interface{})
- func SetLevel(lvl Level)
- func UseLogger(l pobptrace.Logger) (undo func())
- func Warn(fmt string, a ...interface{})
- type DiscardLogger
- type Level
- type RecordLogger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Debug ¶
func Debug(fmt string, a ...interface{})
Debug prints the given message if the level is LevelDebug.
func DebugEnabled ¶
func DebugEnabled() bool
DebugEnabled returns true if debug log messages are enabled. This can be used in extremely hot code paths to avoid allocating the ...interface{} argument.
func Error ¶
func Error(format string, a ...interface{})
Error reports an error. Errors get aggregated and logged periodically. The default is once per minute or once every POBP_LOGGING_RATE number of seconds.
Types ¶
type RecordLogger ¶
type RecordLogger struct {
// contains filtered or unexported fields
}
RecordLogger records every call to Log() and makes it available via Logs().
func (*RecordLogger) Logs ¶
func (r *RecordLogger) Logs() []string
Logs returns the ordered list of logs recorded by the logger.
Click to show internal directories.
Click to hide internal directories.