Documentation
¶
Index ¶
Constants ¶
View Source
const FiltersFormat string = `([a-z]+)\((.*?)\)`
FiltersFormat must filter key format
View Source
const FunctionsFormat string = `%{([a-z]+)(?::(.*?[^\\]))?}`
FunctionsFormat must function key format
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Format ¶
type Format string
Format logger output format
const (
DefaultFormat Format = "%{color}%{severity:substring(0:4)}[%{datetime}]%{reset} %{message}"
)
type Level ¶
type Level int
Level logger available
const ( LevelDefault Level = 0 // The log entry has no assigned severity level. LevelDebug Level = 100 // Debug or trace information. LevelInfo Level = 200 // Routine information, such as ongoing status or performance. LevelNotice Level = 300 // Normal but significant events, such as start up, shut down, or a configuration change. LevelWarning Level = 400 // Warning events might cause problems. LevelError Level = 500 // Error events are likely to cause problems. LevelCritical Level = 600 // Critical events cause more severe problems or outages. LevelAlert Level = 700 // A person must take an action immediately. LevelEmergency Level = 800 // One or more systems are unusable. )
The severity of the event described in a log entry, expressed as one of the standard severity levels listed below. For your reference, the levels are assigned the listed numeric values. The effect of using numeric values other than those listed is undefined. @see: https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry#LogSeverity
func ParseLevel ¶
ParseLevel convert string level value to interface
Click to show internal directories.
Click to hide internal directories.