wd

package
v0.0.0-...-79153e9 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2017 License: MIT Imports: 3 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddMutator

func AddMutator(m slf.Mutator)

AddMutator registers mutator

func AddReceiver

func AddReceiver(r slf.Receiver)

AddReceiver registers receiver in default receivers pool

func CountParam

func CountParam(value int) slf.Param

CountParam is alias for IntParam with key "count"

func DeltaParam

func DeltaParam(elapsed time.Duration) slf.Param

DeltaParam returns duration param with name "delta"

func ErrParam

func ErrParam(err error) slf.Param

ErrParam returns Param for errors with key "err"

func FloatParam

func FloatParam(name string, value float64) slf.Param

FloatParam return Param for float values

func ID64Param

func ID64Param(value int64) slf.Param

ID64Param return int64 Param with key "id"

func Int64Param

func Int64Param(name string, value int64) slf.Param

Int64Param return int64 Param

func IntParam

func IntParam(name string, value int) slf.Param

IntParam return integer Param

func NameParam

func NameParam(value string) slf.Param

NameParam is alias for StringParam with key "name"

func StringParam

func StringParam(name, value string) slf.Param

StringParam returns Param for strings

Types

type Watchdog

type Watchdog interface {
	slf.Logger
	slf.StatsReporter

	// WithParams returns copy of watchdog with pre-setted params
	// Useful for context-based logging
	WithParams(...slf.Param) Watchdog
}

Watchdog interface combines logger and metrics functionality

func Custom

func Custom(name, metricsPrefix string, target slf.Receiver) Watchdog

Custom creates and returns watchdog with custom events receivers pipe

func New

func New(name, metricsPrefix string) Watchdog

New builds and returns new watchdog

func NewLogger

func NewLogger(name string) Watchdog

NewLogger builds and returns new watchdog, supposed to be used as logger i.e. without metrics prefix

func NewStatsReporter

func NewStatsReporter(metricsPrefix string) Watchdog

NewStatsReporter builds and returns new watchdog, supposed to be used as stats reporter

Jump to

Keyboard shortcuts

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