Closed mahiro72 closed 3 weeks ago
The recent changes streamline the logging mechanism by replacing custom logger initialization with a standardized default logger setup using logrus
. This involves modifying the Knuu
constructor to use log.DefaultLogger()
and introducing the DefaultLogger()
function in the log
package to configure the logger with custom settings.
Files | Change Summary |
---|---|
pkg/knuu/knuu.go |
Removed imports for path , runtime , and strconv . Replaced defaultLogger() with log.DefaultLogger() . |
pkg/log/logger.go |
Introduced DefaultLogger() function to configure a default logger using logrus . |
sequenceDiagram
participant Client
participant Knuu
participant Logger
Client->>Knuu: New(ctx, opts...)
Knuu->>Logger: log.DefaultLogger()
Logger-->>Knuu: Configured Logger
Knuu-->>Client: *Knuu, error
In the land of code, a change took flight,
Withlogrus
guiding through the night,
No more custom paths to tread,
A default logger now instead.
Simpler logs, a clearer way,
Celebrate this bright new day!
🐇✨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Overview
defaultLogger
function to a log directory and renameDefaultLogger
DefaultLogger
from the other packagesissue:
Summary by CodeRabbit
New Features
Refactor