Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
Context to associate to a logger
func WithDebugContext ¶
WithDebugContext is a specialized context to allow debug lines to be related and annotated
type Frame ¶
type Frame uintptr
Frame represents a program counter inside a stack frame.
func (Frame) Format ¶
Format formats the frame according to the fmt.Formatter interface.
%s source file %d source line %n function name %v equivalent to %s:%d
Format accepts flags that alter the printing of some verbs, as follows:
%+s path of source file relative to the compile time GOPATH %+v equivalent to %+s:%d
type Log ¶
type Log interface {
Info(a ...interface{})
Warn(a ...interface{})
Error(err error)
Debug(a ...interface{})
Infof(format string, a ...interface{})
Warnf(format string, a ...interface{})
Debugf(format string, a ...interface{})
// logs the current stack and message at the DEBUG level
Stackf(format string, a ...interface{})
WithContext(contexts ...Context) Log
}
Log is the logger
func WithContext ¶
WithContext creates a logger with a context
type StackTrace ¶
type StackTrace []Frame
StackTrace is stack of Frames from innermost (newest) to outermost (oldest).
Click to show internal directories.
Click to hide internal directories.