Documentation
      ¶
    
    
  
    
  
    Index ¶
- Constants
 - type Logger
 - type NopeLogger
 - func (lc NopeLogger) Debug(_ string, _ ...any)
 - func (lc NopeLogger) Debugf(_ string, _ ...any)
 - func (lc NopeLogger) Error(_ string, _ ...any)
 - func (lc NopeLogger) Errorf(_ string, _ ...any)
 - func (lc NopeLogger) Info(_ string, _ ...any)
 - func (lc NopeLogger) Infof(_ string, _ ...any)
 - func (lc NopeLogger) LogLevel() string
 - func (lc NopeLogger) SetLogLevel(_ string) error
 - func (lc NopeLogger) Trace(_ string, _ ...any)
 - func (lc NopeLogger) Tracef(_ string, _ ...any)
 - func (lc NopeLogger) Warn(_ string, _ ...any)
 - func (lc NopeLogger) Warnf(_ string, _ ...any)
 
Constants ¶
const ( TraceLog = "TRACE" DebugLog = "DEBUG" InfoLog = "INFO" WarnLog = "WARN" ErrorLog = "ERROR" )
These constants identify the log levels in order of increasing severity.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logger ¶
type Logger interface {
	// SetLogLevel sets minimum severity log level. If a logging method is called with a lower level of severity than
	// what is set, it will result in no output.
	SetLogLevel(logLevel string) error
	// LogLevel returns the current log level setting
	LogLevel() string
	// Debug logs a message at the DEBUG severity level
	Debug(msg string, args ...any)
	// Error logs a message at the ERROR severity level
	Error(msg string, args ...any)
	// Info logs a message at the INFO severity level
	Info(msg string, args ...any)
	// Trace logs a message at the TRACE severity level
	Trace(msg string, args ...any)
	// Warn logs a message at the WARN severity level
	Warn(msg string, args ...any)
	// Debugf logs a formatted message at the DEBUG severity level
	Debugf(msg string, args ...any)
	// Errorf logs a formatted message at the ERROR severity level
	Errorf(msg string, args ...any)
	// Infof logs a formatted message at the INFO severity level
	Infof(msg string, args ...any)
	// Tracef logs a formatted message at the TRACE severity level
	Tracef(msg string, args ...any)
	// Warnf logs a formatted message at the WARN severity level
	Warnf(msg string, args ...any)
}
    Logger defines the interface for logging operations.
func InitLogger ¶
InitLogger creates an instance of Logger
type NopeLogger ¶
type NopeLogger struct {
}
    NopeLogger is a no-operation logger that implements the Logger interface
func (NopeLogger) Debug ¶
func (lc NopeLogger) Debug(_ string, _ ...any)
Debug simulates logging an entry at the DEBUG severity level
func (NopeLogger) Debugf ¶
func (lc NopeLogger) Debugf(_ string, _ ...any)
Debugf simulates logging an formatted message at the DEBUG severity level
func (NopeLogger) Error ¶
func (lc NopeLogger) Error(_ string, _ ...any)
Error simulates logging an entry at the ERROR severity level
func (NopeLogger) Errorf ¶
func (lc NopeLogger) Errorf(_ string, _ ...any)
Errorf simulates logging an formatted message at the ERROR severity level
func (NopeLogger) Info ¶
func (lc NopeLogger) Info(_ string, _ ...any)
Info simulates logging an entry at the INFO severity level
func (NopeLogger) Infof ¶
func (lc NopeLogger) Infof(_ string, _ ...any)
Infof simulates logging an formatted message at the INFO severity level
func (NopeLogger) LogLevel ¶
func (lc NopeLogger) LogLevel() string
LogLevel returns the current log level setting
func (NopeLogger) SetLogLevel ¶
func (lc NopeLogger) SetLogLevel(_ string) error
SetLogLevel simulates setting a log severity level
func (NopeLogger) Trace ¶
func (lc NopeLogger) Trace(_ string, _ ...any)
Trace simulates logging an entry at the TRACE severity level
func (NopeLogger) Tracef ¶
func (lc NopeLogger) Tracef(_ string, _ ...any)
Tracef simulates logging an formatted message at the TRACE severity level
func (NopeLogger) Warn ¶
func (lc NopeLogger) Warn(_ string, _ ...any)
Warn simulates logging an entry at the WARN severity level
func (NopeLogger) Warnf ¶
func (lc NopeLogger) Warnf(_ string, _ ...any)
Warnf simulates logging an formatted message at the WARN severity level