MCPcopy Create free account
hub / github.com/cortexproject/cortex / InitEvents

Function InitEvents

pkg/util/events.go:28–34  ·  view source on GitHub ↗

InitEvents initializes event sampling, with the given frequency. Zero=off.

(freq int)

Source from the content-addressed store, hash-verified

26
27// InitEvents initializes event sampling, with the given frequency. Zero=off.
28func InitEvents(freq int) {
29 if freq <= 0 {
30 eventLogger = log.NewNopLogger()
31 } else {
32 eventLogger = newEventLogger(freq)
33 }
34}
35
36func newEventLogger(freq int) log.Logger {
37 l := log.NewLogfmtLogger(log.NewSyncWriter(os.Stderr))

Callers 1

mainFunction · 0.92

Calls 1

newEventLoggerFunction · 0.85

Tested by

no test coverage detected