The task is to create a solution to manage a log file. This involves adding records to a log file, and printing the contents of a log file. The log file has a predefined format, as specified in software requirements document.
The task is divided in 2 parts i.e. create 'AppendLog' utility which appends the text message specified by the –t option to the log file specified by the –f option. If the specified file does not exist, it is created. If the optional –a parameter is set, the auxiliary flag will be set for the log record. And second part is to create 'DumpLog' utility which prints each record in the log file specified by the –f option to standard output. Printed output is decoded in a user-friendly way, eliminating the need to refer to the file format specification.