Documentation
¶
Index ¶
- func AddWriter(key string, writer zapcore.WriteSyncer)
- func Debug(msg string, args ...any)
- func Error(msg string, args ...any)
- func Fatal(msg string, args ...any)
- func Info(msg string, args ...any)
- func NewLogger(config *configs.LoggerConfig)
- func ParseLevel(levelStr string) zapcore.Level
- func Warn(msg string, args ...any)
- type GnetLogger
- type LoggerSetting
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddWriter ¶
func AddWriter(key string, writer zapcore.WriteSyncer)
func NewLogger ¶
func NewLogger(config *configs.LoggerConfig)
func ParseLevel ¶
ParseLevel converts a string level to zapcore.Level It maps common log level names to their corresponding zapcore values If the input is not recognized, it returns InfoLevel as default
Types ¶
type GnetLogger ¶
type GnetLogger struct {
}
GnetLogger is a logger implementation for gnet library It forwards logs to our internal logging system This allows us to maintain consistent logging across different components
func (GnetLogger) Debugf ¶
func (g GnetLogger) Debugf(format string, args ...any)
Debugf logs debug level messages. It forwards the log message to the internal debug logger.
func (GnetLogger) Errorf ¶
func (g GnetLogger) Errorf(format string, args ...any)
Errorf logs error level messages. It forwards the log message to the internal error logger.
func (GnetLogger) Fatalf ¶
func (g GnetLogger) Fatalf(format string, args ...any)
Fatalf logs fatal level messages and then calls os.Exit(1). It forwards the log message to the internal fatal logger.
func (GnetLogger) Infof ¶
func (g GnetLogger) Infof(format string, args ...any)
Infof logs info level messages. It forwards the log message to the internal info logger.
func (GnetLogger) Warnf ¶
func (g GnetLogger) Warnf(format string, args ...any)
Warnf logs warning level messages. It forwards the log message to the internal warn logger.
type LoggerSetting ¶
type LoggerSetting struct {
// contains filtered or unexported fields
}