Documentation
¶
Index ¶
- type LogLevel
- type LogOutput
- type ParanoidLogger
- func (l *ParanoidLogger) AddAdditionalWriter(writer io.Writer)
- func (l *ParanoidLogger) Debug(v ...interface{})
- func (l *ParanoidLogger) Debugf(format string, v ...interface{})
- func (l *ParanoidLogger) Error(v ...interface{})
- func (l *ParanoidLogger) Errorf(format string, v ...interface{})
- func (l *ParanoidLogger) Fatal(v ...interface{})
- func (l *ParanoidLogger) Fatalf(format string, v ...interface{})
- func (l *ParanoidLogger) Info(v ...interface{})
- func (l *ParanoidLogger) Infof(format string, v ...interface{})
- func (l *ParanoidLogger) SetLogLevel(level LogLevel)
- func (l *ParanoidLogger) SetOutput(output LogOutput) error
- func (l *ParanoidLogger) Verbose(v ...interface{})
- func (l *ParanoidLogger) Verbosef(format string, v ...interface{})
- func (l *ParanoidLogger) Warn(v ...interface{})
- func (l *ParanoidLogger) Warnf(format string, v ...interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LogLevel ¶
type LogLevel int
LogLevel is an abstraction over int that allows to better undestand the input of SetLogLevel
type ParanoidLogger ¶
type ParanoidLogger struct {
// contains filtered or unexported fields
}
ParanoidLogger struct containing the variables necessary for the logger
func New ¶
func New(currentPackage string, component string, logDirectory string) *ParanoidLogger
New creates a new logger and returns a new logger
func (*ParanoidLogger) AddAdditionalWriter ¶
func (l *ParanoidLogger) AddAdditionalWriter(writer io.Writer)
AddAdditionalWriter allows to add a custom writer to the logger. This can be cleared by calling logger.SetOutput() again
func (*ParanoidLogger) Debug ¶
func (l *ParanoidLogger) Debug(v ...interface{})
Debug only prints if LogLevel is set to DEBUG
func (*ParanoidLogger) Debugf ¶
func (l *ParanoidLogger) Debugf(format string, v ...interface{})
Debug only prints if LogLevel is set to DEBUG
func (*ParanoidLogger) Error ¶
func (l *ParanoidLogger) Error(v ...interface{})
Error only prints if LogLevel is set to ERROR or lower in importance
func (*ParanoidLogger) Errorf ¶
func (l *ParanoidLogger) Errorf(format string, v ...interface{})
Error only prints if LogLevel is set to ERROR or lower in importance
func (*ParanoidLogger) Fatal ¶
func (l *ParanoidLogger) Fatal(v ...interface{})
Fatal always prints and exits the program with exit code 1
func (*ParanoidLogger) Fatalf ¶
func (l *ParanoidLogger) Fatalf(format string, v ...interface{})
Fatal always prints and exits the program with exit code 1
func (*ParanoidLogger) Info ¶
func (l *ParanoidLogger) Info(v ...interface{})
Info only prints if LogLevel is set to INFO or lower in importance
func (*ParanoidLogger) Infof ¶
func (l *ParanoidLogger) Infof(format string, v ...interface{})
Info only prints if LogLevel is set to INFO or lower in importance
func (*ParanoidLogger) SetLogLevel ¶
func (l *ParanoidLogger) SetLogLevel(level LogLevel)
SetLogLevel sets the logging level for the logger
func (*ParanoidLogger) SetOutput ¶
func (l *ParanoidLogger) SetOutput(output LogOutput) error
SetOutput sets the default output for the logger
func (*ParanoidLogger) Verbose ¶
func (l *ParanoidLogger) Verbose(v ...interface{})
Verbose only prints if LogLevel is set to VERBOSE or lower in importance
func (*ParanoidLogger) Verbosef ¶
func (l *ParanoidLogger) Verbosef(format string, v ...interface{})
Verbose only prints if LogLevel is set to VERBOSE or lower in importance
func (*ParanoidLogger) Warn ¶
func (l *ParanoidLogger) Warn(v ...interface{})
Warn only prints if LogLevel is set to WARNING or lower in importance
func (*ParanoidLogger) Warnf ¶
func (l *ParanoidLogger) Warnf(format string, v ...interface{})
Warn only prints if LogLevel is set to WARNING or lower in importance