Documentation ¶
Overview ¶
The logging package is a wrapper around github.com/sirupsen/logrus that provides some convenience methods and improved error reporting.
Index ¶
- Constants
- Variables
- type Logger
- func (l Logger) AddHook(outType OutType, dest string) error
- func (l Logger) NoFields() Logger
- func (l Logger) SetLogOut(out io.Writer)
- func (l Logger) SubLogger(fields logrus.Fields) Logger
- func (l Logger) WithError(err error) Logger
- func (l Logger) WithErrorAndFields(err error, fields logrus.Fields) Logger
- func (l Logger) WithField(key string, value interface{}) Logger
- func (l Logger) WithFields(fields logrus.Fields) Logger
- type OutType
- type ProcessCounter
- type SocketHook
Constants ¶
View Source
const (
OutSocket = OutType("socket")
)
Recognized output hook types
Variables ¶
View Source
var DefaultLogger = NewLogger(logrus.Fields{})
Functions ¶
This section is empty.
Types ¶
type Logger ¶
Logger is a thin wrapper around a logrus.Entry that lets us extend and override some of Entry's methods.
func TestLogger ¶
func TestLogger() Logger
func (Logger) WithErrorAndFields ¶
type ProcessCounter ¶
type ProcessCounter struct{}
ProcessCounter is a Logrus hook that appends a sequence number to all entries. This hook should appear before other hooks that externalize data, to ensure that they see the added fields.
func (ProcessCounter) Levels ¶
func (ProcessCounter) Levels() []logrus.Level
type SocketHook ¶
type SocketHook struct {
// contains filtered or unexported fields
}
func (SocketHook) Levels ¶
func (SocketHook) Levels() []logrus.Level
Click to show internal directories.
Click to hide internal directories.