Documentation
¶
Index ¶
- func SetDefault(l *Wrapper)
- type Severity
- type Wrapper
- func (w *Wrapper) Alert(msg string, err error)
- func (w *Wrapper) AlertData(msg string, err error, data interface{})
- func (w *Wrapper) Critical(msg string, err error)
- func (w *Wrapper) CriticalData(msg string, err error, data interface{})
- func (w *Wrapper) Debug(msg string)
- func (w *Wrapper) DebugData(msg string, data interface{})
- func (w *Wrapper) DebugF(format string, args ...interface{})
- func (w *Wrapper) Emergency(msg string, err error)
- func (w *Wrapper) EmergencyData(msg string, err error, data interface{})
- func (w *Wrapper) Error(msg string, err error)
- func (w *Wrapper) ErrorData(msg string, err error, data interface{})
- func (w *Wrapper) Info(msg string)
- func (w *Wrapper) InfoData(msg string, data interface{})
- func (w *Wrapper) InfoF(format string, args ...interface{})
- func (w *Wrapper) Notice(msg string)
- func (w *Wrapper) NoticeData(msg string, data interface{})
- func (w *Wrapper) NoticeF(format string, args ...interface{})
- func (w *Wrapper) Warning(msg string)
- func (w *Wrapper) WarningData(msg string, data interface{})
- func (w *Wrapper) WarningF(format string, args ...interface{})
- func (w *Wrapper) Writer() Writer
- type Writer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Severity ¶
type Severity int
Severity of the log message.
const ( // Default means that the log entry has no assigned severity level. Default Severity = iota * 100 // Debug or trace information. Debug // Info events are routine information, such as ongoing status or performance. Info // Notice are normal but significant events, such as start up, shut down, or a configuration change. Notice // Warning events might cause problems. Warning // Error events are likely to cause problems. Error // Critical events cause more severe problems or outages. Critical // Alert events mean that a person must take an action immediately. Alert // Emergency means that one or more systems are unusable. Emergency )
func ParseSeverity ¶
ParseSeverity parses a string value into a Severity.
type Wrapper ¶
type Wrapper struct {
// contains filtered or unexported fields
}
Wrapper writes application log entries.
func (*Wrapper) CriticalData ¶
CriticalData writes critical logs with additional structured data.
func (*Wrapper) EmergencyData ¶
EmergencyData writes emergency logs with additional structured data.
func (*Wrapper) NoticeData ¶
NoticeData writes notice logs with additional structured data.
func (*Wrapper) WarningData ¶
WarningData writes warning logs with additional structured data.
type Writer ¶
type Writer interface { CreateLogEntry(severity Severity, msg string, err error, data interface{}) string WriteLog(severity Severity, msg string, err error, data interface{}) AddHTTPRequest(req *http.Request) Writer AddRequestID(requestID string) Writer }
Writer writes application log entries
Click to show internal directories.
Click to hide internal directories.