Skip to content

Commit

Permalink
agent: Set log level to info (#969)
Browse files Browse the repository at this point in the history
Our current debug logs are largely not useful in production, and the
volume is very high.
So, let's disable debug logs for now - can individually re-enable log
lines by setting them to info later, when needed.

Ref https://neondb.slack.com/archives/C03TN5G758R/p1718652664673599?thread_ts=1718210683.556539
  • Loading branch information
sharnoff authored Jun 17, 2024
1 parent 9f81d6e commit 64761aa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/autoscaler-agent/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import (

func main() {
logConfig := zap.NewProductionConfig()
logConfig.Sampling = nil // Disable sampling, which the production config enables by default.
logConfig.Level.SetLevel(zap.DebugLevel) // Allow debug logs
logConfig.Sampling = nil // Disable sampling, which the production config enables by default.
logConfig.Level.SetLevel(zap.InfoLevel) // Only "info" level and above (i.e. not debug logs)
logger := zap.Must(logConfig.Build()).Named("autoscaler-agent")
defer logger.Sync() //nolint:errcheck // what are we gonna do, log something about it?

Expand Down

0 comments on commit 64761aa

Please sign in to comment.