1
1
Fork 0
exercism/jq/log-line-parser/HINTS.md
Christina Sørensen 0a4ebc2eb6
chore: init
Signed-off-by: Christina Sørensen <christina@cafkafk.com>
2024-12-03 15:51:11 +01:00

481 B

Hints

1. Get message from a log line

  • Extract the text following the first colon.
    • You can use index/1 and the slice notation.
    • Or explore using regular expression functions.
  • Use the provided trim function.

2. Get log level from a log line

  • Extract the text within the first set of brackets.
  • Output the result in lower case.

3. Reformat a log line

  • Reuse the existing functions.
  • Two approaches are to use string interpolation or concatenation.