Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Facility = map[uint8]string{
0: "kernel messages",
1: "user-level messages",
2: "mail system messages",
3: "system daemons messages",
4: "authorization messages",
5: "messages generated internally by syslogd",
6: "line printer subsystem messages",
7: "network news subsystem messages",
8: "UUCP subsystem messages",
9: "clock daemon messages",
10: "security/authorization messages",
11: "ftp daemon messages",
12: "NTP subsystem messages",
13: "audit messages",
14: "console messages",
15: "clock daemon messages",
16: "local use 0 (local0)",
17: "local use 1 (local1)",
18: "local use 2 (local2)",
19: "local use 3 (local3)",
20: "local use 4 (local4)",
21: "local use 5 (local5)",
22: "local use 6 (local6)",
23: "local use 7 (local7)",
}
Facility maps facility numeric codes to facility string messages. As per RFC 5427.
var FacilityKeywords = map[uint8]string{
0: "kern",
1: "user",
2: "mail",
3: "daemon",
4: "auth",
5: "syslog",
6: "lpr",
7: "news",
8: "uucp",
9: "cron",
10: "authpriv",
11: "ftp",
12: "ntp",
13: "security",
14: "console",
15: "cron2",
16: "local0",
17: "local1",
18: "local2",
19: "local3",
20: "local4",
21: "local5",
22: "local6",
23: "local7",
}
FacilityKeywords maps facility numeric codes to facility keywords. As per RFC 5427.
var SeverityLevels = map[uint8]string{
0: "emergency",
1: "alert",
2: "critical",
3: "error",
4: "warning",
5: "notice",
6: "informational",
7: "debug",
}
SeverityLevels maps seveirty levels to severity string levels.
var SeverityLevelsShort = map[uint8]string{
0: "emerg",
1: "alert",
2: "crit",
3: "err",
4: "warning",
5: "notice",
6: "info",
7: "debug",
}
SeverityLevelsShort maps severity levels to severity short string levels as per https://github.com/torvalds/linux/blob/master/tools/include/linux/kern_levels.h and syslog(3).
var SeverityMessages = map[uint8]string{
0: "system is unusable",
1: "action must be taken immediately",
2: "critical conditions",
3: "error conditions",
4: "warning conditions",
5: "normal but significant condition",
6: "informational messages",
7: "debug-level messages",
}
SeverityMessages maps severity levels to severity string messages.
Functions ¶
func EscapeBytes ¶
EscapeBytes adds a backslash to \, ], " characters.
func RemoveBytes ¶
RemoveBytes removes byte at given positions from data byte slice, starting from the given offset.
func UnsafeUTF8DecimalCodePointsToInt ¶
UnsafeUTF8DecimalCodePointsToInt converts a slice containing a series of UTF-8 decimal code points into their integer rapresentation.
It assumes input code points are in the range 48-57. Returns a pointer since an empty slice is equal to nil and not to the zero value of the codomain (ie., `int`).
func ValidPriority ¶
ValidPriority checks whether the given value is in the priority range [0, 191].
func ValidVersion ¶
ValidVersion checks whether the given value is in the version range [1, 999].
Types ¶
This section is empty.