Documentation
¶
Overview ¶
Package logger implements a logger that uses the zap library.
It provides a type ZapLogger that implements the logger.ILogger interface. It also provides a function NewZapLogger() that returns a new ZapLogger.
The ZapLogger has 3 methods: Info, Warning, and Error. Each of these methods logs a message at a different level of severity.
The Info method logs a message at the INFO level of severity. The Warning method logs a message at the WARNING level of severity. The Error method logs a message at the ERROR level of severity.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ILogger ¶
type ILogger interface {
// Info logs informational messages.
Info(string, ...interface{})
// Warning logs warning messages.
Warning(string, ...interface{})
// Error logs error messages.
Error(string, ...interface{})
}
ILogger defines an interface for logging with different levels of severity.
type ZapLogger ¶
type ZapLogger struct {
// contains filtered or unexported fields
}
ZapLogger is a logger that uses the zap library.