Skip to content

Latest commit

 

History

History
38 lines (27 loc) · 952 Bytes

README.md

File metadata and controls

38 lines (27 loc) · 952 Bytes

Log Analyzer

Coding task performed May 2022 in context of an interview process.

Copyright (C) 2022 Sebastian Müller

Task

Log Files

The task was to implement a CLI tool that is able to parse log files.

Log files are defined as text files that contain an arbitrary number of lines consisting of JSON objects. It is guaranteed that each JSON object has a type key providing a String identifier. There might be additional arbitrary key-value pairs in each JSON object.

Example log file:

{"type": "Foo", "id": 3, "cluster": -3}
{"type": "Bar", "error": 1}
{"type": "Foo", "name": "titan", "calibration": 3.141}

Output

The CLI in scope of this task should be able to output a table, providing information on the different types in the log file and the accumulated size in bytes of each such type. In the example above, the output should look similar to this:

Type | Size
-----------
Foo  | 93
Bar  | 27