Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateLogger ¶
Configure and initialize a new Logrus logger instance based on environment variables.
func GetLogLevel ¶
Convert a string value into the corresponding logrus.Level type where the default value is a info log level - supports various logging levels, like Trace, Debug, Info, Warning, Error, Fatal, and Panic, in increasing order of severity.
Types ¶
type StructuredLogger ¶
func (*StructuredLogger) NewLogEntry ¶
func (l *StructuredLogger) NewLogEntry(r *http.Request) middleware.LogEntry
Create a new structured log entry for an incoming HTTP request within a logging middleware, the entry format is designed to play nice with logrus library for logging.
type StructuredLoggerEntry ¶
type StructuredLoggerEntry struct {
Logger logrus.FieldLogger
}
func (*StructuredLoggerEntry) Panic ¶
func (l *StructuredLoggerEntry) Panic(v interface{}, stack []byte)
Handle and log panic situations within a structured logging context.
Click to show internal directories.
Click to hide internal directories.