Documentation
¶
Index ¶
- func SetZeroLogJsonEnabled()
- func WithLevel(level string) func(*ZeroLogger)
- type Logger
- type ZeroLogger
- func (l *ZeroLogger) Debug(ctx context.Context, msg string, fields map[string]interface{})
- func (l *ZeroLogger) Error(ctx context.Context, msg string, fields map[string]interface{})
- func (l *ZeroLogger) Info(ctx context.Context, msg string, fields map[string]interface{})
- func (l *ZeroLogger) Warn(ctx context.Context, msg string, fields map[string]interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetZeroLogJsonEnabled ¶
func SetZeroLogJsonEnabled()
func WithLevel ¶
func WithLevel(level string) func(*ZeroLogger)
WithLevel creates a new ZeroLogger with the specified level
Types ¶
type Logger ¶
type Logger interface {
Info(ctx context.Context, msg string, fields map[string]interface{})
Warn(ctx context.Context, msg string, fields map[string]interface{})
Error(ctx context.Context, msg string, fields map[string]interface{})
Debug(ctx context.Context, msg string, fields map[string]interface{})
}
Logger is an interface for logging
type ZeroLogger ¶
type ZeroLogger struct {
// contains filtered or unexported fields
}
ZeroLogger implements Logger using zerolog
func (*ZeroLogger) Debug ¶
func (l *ZeroLogger) Debug(ctx context.Context, msg string, fields map[string]interface{})
Debug logs a debug message
func (*ZeroLogger) Error ¶
func (l *ZeroLogger) Error(ctx context.Context, msg string, fields map[string]interface{})
Error logs an error message
Click to show internal directories.
Click to hide internal directories.