Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewStackHook ¶
func NewStackHook(options logrus_mate.Options) (hook logrus.Hook, err error)
Types ¶
type LogrusStackHook ¶
type LogrusStackHook struct { // Set levels to CallerLevels for which "caller" value may be set, // providing a single frame of stack. CallerLevels []logrus.Level // Set levels to StackLevels for which "stack" value may be set, // providing the full stack (minus logrus). StackLevels []logrus.Level }
LogrusStackHook is an implementation of logrus.Hook interface.
func NewHook ¶
func NewHook(callerLevels []logrus.Level, stackLevels []logrus.Level) LogrusStackHook
NewHook is the initializer for LogrusStackHook{} (implementing logrus.Hook). Set levels to callerLevels for which "caller" value may be set, providing a single frame of stack. Set levels to stackLevels for which "stack" value may be set, providing the full stack (minus logrus).
func StandardHook ¶
func StandardHook() LogrusStackHook
StandardHook is a convenience initializer for LogrusStackHook{} with default args.
func (LogrusStackHook) Fire ¶
func (hook LogrusStackHook) Fire(entry *logrus.Entry) error
Fire is called by logrus when something is logged.
func (LogrusStackHook) Levels ¶
func (hook LogrusStackHook) Levels() []logrus.Level
Levels provides the levels to filter.
Click to show internal directories.
Click to hide internal directories.