Documentation
¶
Overview ¶
Package logging provides logging interfaces and utilities for LedgerQ.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultLogger ¶
type DefaultLogger struct {
// contains filtered or unexported fields
}
DefaultLogger is a simple logger that writes to stdout/stderr.
func NewDefaultLogger ¶
func NewDefaultLogger(minLevel Level) *DefaultLogger
NewDefaultLogger creates a new default logger with the specified minimum level.
func (*DefaultLogger) Debug ¶
func (l *DefaultLogger) Debug(msg string, fields ...Field)
Debug implements Logger.
func (*DefaultLogger) Error ¶
func (l *DefaultLogger) Error(msg string, fields ...Field)
Error implements Logger.
func (*DefaultLogger) Info ¶
func (l *DefaultLogger) Info(msg string, fields ...Field)
Info implements Logger.
func (*DefaultLogger) Warn ¶
func (l *DefaultLogger) Warn(msg string, fields ...Field)
Warn implements Logger.
type Field ¶
type Field struct {
Key string
Value interface{}
}
Field represents a structured logging field.
type Logger ¶
type Logger interface {
// Debug logs a debug message
Debug(msg string, fields ...Field)
// Info logs an informational message
Info(msg string, fields ...Field)
// Warn logs a warning message
Warn(msg string, fields ...Field)
// Error logs an error message
Error(msg string, fields ...Field)
}
Logger is the interface for logging in LedgerQ. Users can implement this interface to integrate with their logging system.
Click to show internal directories.
Click to hide internal directories.