Documentation
¶
Index ¶
- func AddMutator(m slf.Mutator)
- func AddReceiver(r slf.Receiver)
- func CountParam(value int) slf.Param
- func DeltaParam(elapsed time.Duration) slf.Param
- func ErrParam(err error) slf.Param
- func FloatParam(name string, value float64) slf.Param
- func ID64Param(value int64) slf.Param
- func Int64Param(name string, value int64) slf.Param
- func IntParam(name string, value int) slf.Param
- func NameParam(value string) slf.Param
- func StringParam(name, value string) slf.Param
- type Watchdog
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddReceiver ¶
AddReceiver registers receiver in default receivers pool
func CountParam ¶
CountParam is alias for IntParam with key "count"
func DeltaParam ¶
DeltaParam returns duration param with name "delta"
func FloatParam ¶
FloatParam return Param for float values
func StringParam ¶
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 NewLogger ¶
NewLogger builds and returns new watchdog, supposed to be used as logger i.e. without metrics prefix
func NewStatsReporter ¶
NewStatsReporter builds and returns new watchdog, supposed to be used as stats reporter
Click to show internal directories.
Click to hide internal directories.