Module protocol

A transcript of the current session can be written to a file. The transcript captures what is read from the console and written to the console.

Example:
?- protocol('session.log').
Yes
... do something ...

?- noprotocol.
Yes

The transcript captures only the console input/output of the thread that is attached to the console where the command has been invoked. Other threads will not be visible as long as they don't input/output to this console as well.

The following protocol predicates are provided:

protocol(F):
Start transcript of the current session to the file F. If the file already exists the tran-script is appended to the existing file. Otherwise a new file is created.
noprotocol:
Stop transcript of the current session. The current transcript file is closed.

Kommentare