 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
- type ContextualLogger
- func (l *ContextualLogger) LogBusinessEvent(ctx context.Context, event string, data map[string]interface{})
- func (l *ContextualLogger) LogDatabaseOperation(ctx context.Context, query string, duration time.Duration, rowsAffected int64)
- func (l *ContextualLogger) LogError(ctx context.Context, err error, message string, data map[string]interface{})
- func (l *ContextualLogger) LogExternalAPICall(ctx context.Context, service string, method string, url string, statusCode int, ...)
- func (l *ContextualLogger) LogPerformanceEvent(ctx context.Context, operation string, duration time.Duration, ...)
- func (l *ContextualLogger) LogSecurityEvent(ctx context.Context, event string, data map[string]interface{})
- func (l *ContextualLogger) WithContext(ctx context.Context) *LogEntry
- func (l *ContextualLogger) WithCorrelation(correlationID string) *LogEntry
- func (l *ContextualLogger) WithError(err error) *LogEntry
- func (l *ContextualLogger) WithFields(fields map[string]interface{}) *LogEntry
- func (l *ContextualLogger) WithOperation(operation string) *LogEntry
- func (l *ContextualLogger) WithTenant(tenantID string) *LogEntry
- func (l *ContextualLogger) WithUser(userID string) *LogEntry
 
- type LogEntry
- type Logger
- type LoggerEntry
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContextualLogger ¶
ContextualLogger provides structured logging with context awareness
func (*ContextualLogger) LogBusinessEvent ¶
func (l *ContextualLogger) LogBusinessEvent(ctx context.Context, event string, data map[string]interface{})
Business operation methods
func (*ContextualLogger) LogDatabaseOperation ¶
func (*ContextualLogger) LogExternalAPICall ¶
func (*ContextualLogger) LogPerformanceEvent ¶
func (*ContextualLogger) LogSecurityEvent ¶
func (l *ContextualLogger) LogSecurityEvent(ctx context.Context, event string, data map[string]interface{})
func (*ContextualLogger) WithContext ¶
func (l *ContextualLogger) WithContext(ctx context.Context) *LogEntry
WithContext creates a log entry with context information
func (*ContextualLogger) WithCorrelation ¶
func (l *ContextualLogger) WithCorrelation(correlationID string) *LogEntry
WithCorrelation creates a log entry with correlation ID
func (*ContextualLogger) WithError ¶
func (l *ContextualLogger) WithError(err error) *LogEntry
WithError creates a log entry with error information
func (*ContextualLogger) WithFields ¶
func (l *ContextualLogger) WithFields(fields map[string]interface{}) *LogEntry
WithFields creates a log entry with multiple fields
func (*ContextualLogger) WithOperation ¶
func (l *ContextualLogger) WithOperation(operation string) *LogEntry
WithOperation creates a log entry with operation information
func (*ContextualLogger) WithTenant ¶
func (l *ContextualLogger) WithTenant(tenantID string) *LogEntry
WithTenant creates a log entry with tenant information
func (*ContextualLogger) WithUser ¶
func (l *ContextualLogger) WithUser(userID string) *LogEntry
WithUser creates a log entry with user information
type Logger ¶
type Logger interface {
	// Context-aware logging
	WithContext(ctx context.Context) LoggerEntry
	WithTenant(tenantID string) LoggerEntry
	WithUser(userID string) LoggerEntry
	WithCorrelation(correlationID string) LoggerEntry
	WithOperation(operation string) LoggerEntry
	WithFields(fields map[string]interface{}) LoggerEntry
	WithError(err error) LoggerEntry
	// Business event logging
	LogBusinessEvent(ctx context.Context, event string, data map[string]interface{})
	LogSecurityEvent(ctx context.Context, event string, data map[string]interface{})
	LogPerformanceEvent(ctx context.Context, operation string, duration time.Duration, data map[string]interface{})
	LogError(ctx context.Context, err error, message string, data map[string]interface{})
	LogDatabaseOperation(ctx context.Context, query string, duration time.Duration, rowsAffected int64)
	LogExternalAPICall(ctx context.Context, service string, method string, url string, statusCode int, duration time.Duration)
}
    Logger defines the interface for contextual logging
type LoggerEntry ¶
type LoggerEntry interface {
	// Standard logging levels
	Debug(args ...interface{})
	Info(args ...interface{})
	Warn(args ...interface{})
	Error(args ...interface{})
	Fatal(args ...interface{})
	Panic(args ...interface{})
	// Formatted logging
	Debugf(format string, args ...interface{})
	Infof(format string, args ...interface{})
	Warnf(format string, args ...interface{})
	Errorf(format string, args ...interface{})
	Fatalf(format string, args ...interface{})
	Panicf(format string, args ...interface{})
	// Context and field manipulation
	WithContext(ctx context.Context) LoggerEntry
	WithField(key string, value interface{}) LoggerEntry
	WithFields(fields map[string]interface{}) LoggerEntry
	WithError(err error) LoggerEntry
}
    LoggerEntry defines the interface for a log entry
 Click to show internal directories. 
   Click to hide internal directories.