Documentation ¶
Index ¶
Constants ¶
View Source
const ( // Default means the log entry has no assigned severity level. Default = Severity(0) // Debug means debug or trace information. Debug = Severity(100) // Info means routine information, such as ongoing status or performance. Info = Severity(200) // Notice means normal but significant events, such as start up, shut down, or configuration. Notice = Severity(300) // Warning means events that might cause problems. Warning = Severity(400) // Error means events that are likely to cause problems. Error = Severity(500) // Critical means events that cause more severe problems or brief outages. Critical = Severity(600) // Alert means a person must take an action immediately. Alert = Severity(700) // Emergency means one or more systems are unusable. Emergency = Severity(800) )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Interface ¶
type Interface interface { LogPayload(ctx context.Context, severity Severity, payload interface{}) Log(ctx context.Context, severity Severity, args ...interface{}) Logf(ctx context.Context, severity Severity, fmt string, args ...interface{}) LogErr(ctx context.Context, severity Severity, err error) error }
type Severity ¶
type Severity int
func (Severity) Next ¶ added in v0.0.7
Next returns the next defined Severity. If s is not defined, then Next returns the first defined value. Next() can be used to loop through all values of an enum.
s := Severity(0) for { fmt.Println(s) s = s.Next() if s == Severity(0) { break } }
The exact order that values are returned when looping should not be relied upon.
Click to show internal directories.
Click to hide internal directories.