The "openlog" command is used to log all program input and output (including comments) to the specified file. The file serves as a transcript of the current session.
Warning: If the specified file already exists, its previous contents will be overwritten by the new transcript unless the "append" option is specified using the Command line.
e.g. openlog session.log Begin logging output to "session.log"
e.g. openlog trans append Continue logging output to "trans"
The "closelog" command is used to close the current transcript log file. If no log file is open, a warning is issued, and the command is ignored.
Documenting the steps to find a solution can be as important as the solution itself. Save files may be inadequate because they are simple snapshots of the state of the program at a point in time. To record the process of solving a problem, the transcript and logging commands can be used to capture all program input and output, in its displayed form, to a specified file.