Documentation
¶
Overview ¶
Package log defines standard logging for pearl.
Index ¶
- func Err(logger Logger, err error, msg string)
- func Log(l Logger, lvl Level, msg string)
- type Level
- type Log15
- type Logger
- func ForComponent(logger Logger, name string) Logger
- func ForConn(logger Logger, conn net.Conn) Logger
- func NewDebug() Logger
- func NewLog15(base log15.Logger) Logger
- func WithBytes(logger Logger, key string, data []byte) Logger
- func WithErr(logger Logger, err error) Logger
- func WithTags(logger Logger, tags map[string]string) Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Log15 ¶
type Log15 struct {
// contains filtered or unexported fields
}
Log15 adapts log15 loggers to the Logger interface.
type Logger ¶
type Logger interface { // With adds key value pair(s) to the logging context. With(string, interface{}) Logger // Logging at levels used in the official Tor client. Trace(msg string) Debug(msg string) Info(msg string) Notice(msg string) Warn(msg string) Error(msg string) }
Logger is the base interface for logging in the pearl packages.
func ForComponent ¶
ForComponent adds a tag to the logger labelling the component the logger is for.
Click to show internal directories.
Click to hide internal directories.