Skip to main contentCrate log_parser_by_syn1ak
Source - Grammar
- Grammar parser for structured log entries.
- LogParseError
- Error types for parsing log entries.
- Rule
- DATE
- Full date representation combining year, month, and day.
- DAY
- Represents a day, allowing values from
01 to 31 based on the month’s possible days. - ERROR_CODE
- Represents an error code between 3 and 5 digits.
- LEVEL
- Represents a log level, supporting standard log levels.
- LOG_ENTRY
- Represents a full log entry combining date, time, level, optional fields, and message.
- MESSAGE
- Represents the log message, capturing all characters up to the end of the line.
- MODULE
- Represents a module, prefixed with
"mod-" and followed by alphabetic characters. - MONTH
- Represents a month with leading zero or “10” through “12” for valid month values.
- REQUEST_ID
- Represents a request ID, prefixed with
"req-" and followed by alphanumeric characters. - TIME
- Represents a time with an optional timezone.
- YEAR
- Represents a four-digit year (e.g., “2024”).