logmetrics

package
v0.0.0-...-52243a4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 30, 2018 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultLogger *log.Entry

Functions

This section is empty.

Types

type Metrics

type Metrics map[logrus.Level]metrics.Meter

Metrics is a logrus hook-compliant struct that records metrics about logging when added to a logrus.Logger

var DefaultMetrics *Metrics

func New

func New() (l *log.Entry, m *Metrics)

New creates a new logger according to horizon specifications.

func NewMetrics

func NewMetrics() *Metrics

NewMetrics creates a new hook for recording metrics.

func (*Metrics) Fire

func (m *Metrics) Fire(e *logrus.Entry) error

Fire is triggered by logrus, in response to a logging event

func (*Metrics) Levels

func (m *Metrics) Levels() []logrus.Level

Levels returns the logging levels that will trigger this hook to run. In this case, all of them.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL