YagaLog v0.3.0 — Functional-options API
Summary
This release introduces a functional-options constructor for YagaLog.
Highlights
- New API: NewLogger(opts ...Option)
- Options included: WithFilePath, WithWriter, WithLevel, WithJSON, WithTimeFormat, WithCaller, WithColors
Migration notes
Replace:
l, err := logger.NewLogger("app.log")
With:
l, err := logger.NewLogger(logger.WithFilePath("app.log"))