package
0.0.0-20241018081110-072913901059
Repository: https://github.com/oldmacloud/crud.git
Documentation: pkg.go.dev

# Functions

DefaultLoggerOptions = WithLevel(LevelDebug) + WithReportCaller(false) + WithHook(RequestIDHook()).
NewLogger creates and use a new logrus.Logger instance.
RequestIDHook add a context="request_id" field to the log entry.
UseLogger use given logger instance to initializes global Logger.
No description provided by the author
WithLevel sets the Logger level.
WithReportCaller sets the Logger to report the calling function.
ZoneLogger creates a new logger entry with field zone=name.

# Constants

Log levels.
Log levels.
Log levels.
Log levels.
Log levels.

# Variables

Logger is the global Logger instance.
Logger4Gin is a gin middleware for Logger.
Logger4Gorm is the wrapped Logger instance for Gorm.

# Structs

ContextValueFieldHook add a FieldKey=ContextValue(ContextKey) field (if exists) to the log entry.

# Type aliases

Level is the level of log: LevelDebug, LevelInfo, LevelWarn, LevelError.
LoggerOption is a function that can be used to configure the global Logger.