log

package
v0.0.0-...-fe4cb11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 28, 2026 License: Apache-2.0 Imports: 8 Imported by: 17

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddWriter

func AddWriter(key string, writer zapcore.WriteSyncer)

func Debug

func Debug(msg string, args ...any)

Debug

@Description: debug log @param msg The log message

func Error

func Error(msg string, args ...any)

Error

@Description: error log @param msg The log message

func Fatal

func Fatal(msg string, args ...any)

Fatal

@Description: fatal error log @param msg The log message

func Info

func Info(msg string, args ...any)

Info

@Description: info log. @param msg The log message to print.

func NewLogger

func NewLogger(config *configs.LoggerConfig)

func ParseLevel

func ParseLevel(levelStr string) zapcore.Level

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

func Warn

func Warn(msg string, args ...any)

Warn

@Description: warning log @param msg The log message

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
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL