Documentation ¶
Index ¶
- func SetDefault(l *Logger)
- type Entry
- type Logger
- func (l *Logger) Alert() *Entry
- func (l *Logger) Critical() *Entry
- func (l *Logger) Debug() *Entry
- func (l *Logger) Emergency() *Entry
- func (l *Logger) Error() *Entry
- func (l *Logger) Info() *Entry
- func (l *Logger) Notice() *Entry
- func (l *Logger) Severity(severity Severity) *Entry
- func (l *Logger) Sink() Sink
- func (l *Logger) Warning() *Entry
- type Severity
- type Sink
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Entry ¶
type Entry struct { Severity Severity Message string Error error Data interface{} // contains filtered or unexported fields }
Entry represents a log entry.
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
Logger writes application log entries.
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.
Click to show internal directories.
Click to hide internal directories.