Skip to content

Commit

Permalink
Reduce log spam (#167)
Browse files Browse the repository at this point in the history
The flushing log line spews lots of logs and doesn't provide that much
value.
  • Loading branch information
richunger committed Jan 11, 2024
1 parent e6b88e6 commit 6d38a35
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion logging_sink.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func (s *loggingSink) log(name, typ string, value float64) {
}
enc.Encode(logLine{
Message: fmt.Sprintf("flushing %s", typ),
Level: "info",
Level: "debug",
Timestamp: sec,
Logger: "gostats.loggingsink",
JSON: kv,
Expand Down
2 changes: 1 addition & 1 deletion logging_sink_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ func Example_flushCounter() {
l := &loggingSink{writer: os.Stdout, now: foreverNow}
l.FlushCounter("counterName", 420)
// Output:
// {"level":"info","ts":1640995200.000000,"logger":"gostats.loggingsink","msg":"flushing counter","json":{"name":"counterName","type":"counter","value":"420.000000"}}
// {"level":"debug","ts":1640995200.000000,"logger":"gostats.loggingsink","msg":"flushing counter","json":{"name":"counterName","type":"counter","value":"420.000000"}}
}

0 comments on commit 6d38a35

Please sign in to comment.