Log line parser
November 4, 2020 ยท View on GitHub
Story
In this exercise you'll be processing log-lines.
Each log line is a string formatted as follows: "[<LVL>]: <MESSAGE>".
These are the different log levels:
TRC(trace)DBG(debug)INF(info)WRN(warning)ERR(error)FTL(fatal)
Tasks
These are example tasks that fit the log line parser:
- Parse log level to enum
- Support unknown log levels
- Convert a log line to a different format with the log level converted to a numeric value
Implementations
- C#: logs-logs-logs (reference implementation)
- Rust: enums
- Python: log-levels
- Swift: enums