Documentation ¶
Index ¶
- func Debugf(format string, a ...interface{})
- func Error(v interface{})
- func Errorf(format string, a ...interface{})
- func Infof(format string, a ...interface{})
- func Panic(v interface{})
- func Panicf(format string, a ...interface{})
- func Warnf(format string, a ...interface{})
- type Event
- type Logger
- type Severity
- type StdoutLogger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Event ¶
type Event struct { Timestamp time.Time Severity Severity Message string Metadata map[string]string }
Event represents a single log event
type Logger ¶
type Logger interface {
Log(*Event)
}
Logger logs logs
var DefaultLogger Logger
DefaultLogger should be used to log all events
func NewStdoutLogger ¶
func NewStdoutLogger() Logger
NewStdoutLogger returns a StdoutLogger for the service with the given name
type Severity ¶
type Severity int
Severity is a subset of the syslog severity levels
const ( // DebugSeverity is the severity used for debug-level messages DebugSeverity Severity = 2 // InfoSeverity is the severity used for informational messages InfoSeverity Severity = 3 // WarnSeverity is the severity used for warning conditions WarnSeverity Severity = 5 // ErrorSeverity is the severity used for error conditions ErrorSeverity Severity = 6 // UnknownSeverity is the value used when the severity cannot be derived UnknownSeverity Severity = 10 )
func (*Severity) UnmarshalJSON ¶
UnmarshalJSON unmarshals a JSON string into a Severity
Click to show internal directories.
Click to hide internal directories.