Closed shayr80 closed 2 years ago
Excellent work!
I made a few small changes before merging:
std::put_time
from \<iomanip> instead of strftime
from \<time.c>
std::put_time
doesn't require a fixed size char bufferformat_log_data()
to use a regular expression instead, because I felt it was more readable (although that is debatable)I noticed the LogsTest.TEST_FORMAT_TIMESTAMP
can be brittle. It fails when the tester is not in the Eastern Timezone. We may want to change the test (or mock localtime()
in Logs::format_timestamp()
) to fix this problem.
Updated aa-caller to use journalctl instead of dmesg, updated Logs class to correctly parse logs obtained using journalctl, and updated LogsTest class unit tests to reflect changes made to Logs class