Documentation
¶
Index ¶
- Constants
- type Config
- type HlLogger
- func (l *HlLogger) Debug(message string)
- func (l *HlLogger) Debugf(format string, a ...interface{})
- func (l *HlLogger) Error(message string)
- func (l *HlLogger) Errorf(format string, a ...interface{})
- func (l *HlLogger) Fatal(exitCode int, message string)
- func (l *HlLogger) Fatalf(exitCode int, format string, a ...interface{})
- func (l *HlLogger) Info(message string)
- func (l *HlLogger) Infof(format string, a ...interface{})
- func (l *HlLogger) IsDebugShown() (shown bool)
- func (l *HlLogger) IsErrorShown() (shown bool)
- func (l *HlLogger) IsFatalShown() (shown bool)
- func (l *HlLogger) IsInfoShown() (shown bool)
- func (l *HlLogger) IsWarningShown() (shown bool)
- func (l *HlLogger) Output(message string)
- func (l *HlLogger) Outputf(format string, a ...interface{})
- func (l *HlLogger) Warning(message string)
- func (l *HlLogger) Warningf(format string, a ...interface{})
- type LogLevel
Constants ¶
const ( Ldate = log.Ldate Ltime = log.Ltime Lmicroseconds = log.Lmicroseconds Llongfile = log.Llongfile Lshortfile = log.Lshortfile LUTC = log.LUTC LstdFlags = log.LstdFlags )
Forwarders to the log package flags
const ( // SystemdDebugPrefix is the string to prefix in Debug for systemd-journald SystemdDebugPrefix = "<7>" // SystemdInfoPrefix is the string to prefix in Info for systemd-journald SystemdInfoPrefix = "<6>" // SystemdNoticePrefix is the string to prefix in Notice for systemd-journald SystemdNoticePrefix = "<5>" // SystemdWarningPrefix is the string to prefix in Warning for systemd-journald SystemdWarningPrefix = "<4>" // SystemdErrPrefix is the string to prefix in Error for systemd-journald SystemdErrPrefix = "<3>" // SystemdCritPrefix is the string to prefix in Critical for systemd-journald SystemdCritPrefix = "<2>" // SystemdAlertPrefix is the string to prefix in Alert for systemd-journald SystemdAlertPrefix = "<1>" // SystemdEmergPrefix is the string to prefix in Emergency for systemd-journald SystemdEmergPrefix = "<0>" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HlLogger ¶
type HlLogger struct {
// contains filtered or unexported fields
}
HlLogger is a wrapper around the log/logger
func (*HlLogger) Fatal ¶
Fatal is a wrapper to Output() It will also print the message on stderr and exit with error code 1
func (*HlLogger) IsDebugShown ¶
IsDebugShown returns true if the Debug level is in use
func (*HlLogger) IsErrorShown ¶
IsErrorShown returns true if the Error level is in use
func (*HlLogger) IsFatalShown ¶
IsFatalShown returns true if the Fatal level is in use
func (*HlLogger) IsInfoShown ¶
IsInfoShown returns true if the Info level is in use
func (*HlLogger) IsWarningShown ¶
IsWarningShown returns true if the Warning level is in use
type LogLevel ¶
type LogLevel uint8
LogLevel defines logging level constants
func (*LogLevel) SystemdPrefix ¶
SystemdPrefix returns the appropriate prefix for systemd-journald