Skip to content

v2.0.5 — Default log level: Info

Choose a tag to compare

@semihalev semihalev released this 25 Apr 13:25
· 16 commits to main since this release

Small release that flips the default log level from Debug to Info.

Breaking

  • The default level for New() / NewStructured() / NewUltimateLogger() is now LevelInfo. Apps relying on Debug messages appearing without an explicit SetLevel(LevelDebug) will now see them filtered out.

Why

Production deployments almost always want Info-and-above. Defaulting to Debug meant every new caller had to remember to bump the level or pay for verbose output and the small cost of formatting it.

Migration

If you want the old behavior:

log := zlog.NewStructured()
log.SetLevel(zlog.LevelDebug)