Documentation
¶
Overview ¶
Package logging provides structured logging functionality for the application. It wraps the zap.SugaredLogger to enable easy and efficient logging with support for different log levels and structured log entries.
Index ¶
- func InterceptorLogger(l *zap.Logger) logging.Logger
- type LogEntry
- type Logger
- func (l *Logger) Close() error
- func (l *Logger) Debug(message string, keysAndValues ...interface{})
- func (l *Logger) Error(message string, keysAndValues ...interface{})
- func (l *Logger) Fatal(message string, keysAndValues ...interface{})
- func (l *Logger) Info(message string, keysAndValues ...interface{})
- func (l *Logger) Printf(format string, v ...interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type LogEntry ¶
type LogEntry interface {
// Write logs the status, bytes, header, elapsed time, and extra information.
Write(status, bytes int, header http.Header, elapsed time.Duration, extra interface{})
// Panic logs a panic message with the stack trace.
Panic(v interface{}, stack []byte)
}
LogEntry defines the interface for log entries.
type Logger ¶
type Logger struct {
*zap.SugaredLogger
}
Logger wraps the zap.SugaredLogger to provide structured logging.
func (*Logger) Fatal ¶
Fatal logs a fatal message with additional context and then exits the application.
Click to show internal directories.
Click to hide internal directories.