This C++ program reads in log files with the format:
timestamp|category|log_message
Follow by CLI options to retrieve and modify the log file as wished
- To compile this program, run
make all - This should generate the
logmanexecutable
The logman program reads in log files as such:
>./logman log_file
The commands logman support are:
- Timestamps Search t <timestamp1>|<timestamp2>&l
- Matching Timestamp m <timestamp>
- Category Search c <string>
- Keyword Search k <string>
- Append Log Entry (by entryID) a <integer>
- Append Search Results r
- Delete Log Entry d <integer>
- Move to Beginning b <integer>
- Move to End e <integer>
- Sort Excerpt List s
- Clear Excerpt List l
- Print Most Recent Search Results g
- Print Excerpt List p
- Quit q
- No Operation (comment) #
You can also batch commands together into a file. For example:
>./logman spec-log.txt < spec-cmds.txt
Finally, run make clean to clean up the directory
Thanks for stopping by!