Documentation ¶
Overview ¶
Package log defines SCALIBR's logger interface. By default it uses the Go logger but it can be replaced with user-defined loggers.
Index ¶
- func Debug(args ...any)
- func Debugf(format string, args ...any)
- func Error(args ...any)
- func Errorf(format string, args ...any)
- func Info(args ...any)
- func Infof(format string, args ...any)
- func SetLogger(l Logger)
- func Warn(args ...any)
- func Warnf(format string, args ...any)
- type DefaultLogger
- func (l *DefaultLogger) Debug(args ...any)
- func (l *DefaultLogger) Debugf(format string, args ...any)
- func (DefaultLogger) Error(args ...any)
- func (DefaultLogger) Errorf(format string, args ...any)
- func (DefaultLogger) Info(args ...any)
- func (DefaultLogger) Infof(format string, args ...any)
- func (DefaultLogger) Warn(args ...any)
- func (DefaultLogger) Warnf(format string, args ...any)
- type Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DefaultLogger ¶
type DefaultLogger struct {
Verbose bool // Whether debug logs should be shown.
}
DefaultLogger is the Logger implementation used by default. It just logs to stderr using the default Go logger.
func (*DefaultLogger) Debug ¶
func (l *DefaultLogger) Debug(args ...any)
Debug is the debug logging function.
func (*DefaultLogger) Debugf ¶
func (l *DefaultLogger) Debugf(format string, args ...any)
Debugf is the formatted debug logging function.
func (DefaultLogger) Error ¶
func (DefaultLogger) Error(args ...any)
Error is the error logging function.
func (DefaultLogger) Errorf ¶
func (DefaultLogger) Errorf(format string, args ...any)
Errorf is the formatted error logging function.
func (DefaultLogger) Info ¶
func (DefaultLogger) Info(args ...any)
Info is the info logging function.
func (DefaultLogger) Infof ¶
func (DefaultLogger) Infof(format string, args ...any)
Infof is the formatted info logging function.
func (DefaultLogger) Warn ¶
func (DefaultLogger) Warn(args ...any)
Warn is the warning logging function.
func (DefaultLogger) Warnf ¶
func (DefaultLogger) Warnf(format string, args ...any)
Warnf is the formatted warning logging function.
type Logger ¶
type Logger interface { // Logs in different log levels, either formatted or unformatted. Errorf(format string, args ...any) Error(args ...any) Warnf(format string, args ...any) Warn(args ...any) Infof(format string, args ...any) Info(args ...any) Debugf(format string, args ...any) Debug(args ...any) }
Logger is SCALIBR's logging interface.
Click to show internal directories.
Click to hide internal directories.