The JOURNAL procedure provides a record of an interactive session by saving, in a file, all text entered from the terminal in response to the IDL prompt. The first call to JOURNAL starts the logging process. The read-only system variable !JOURNAL is set to the file unit used. To stop saving commands and close the file, call JOURNAL with no parameters. If logging is in effect and JOURNAL is called with a parameter, the parameter is written to the journal file.
Examples
To begin journaling to the file myjournal.pro, enter:
JOURNAL, 'myjournal.pro'
Any commands entered at the IDL prompt are recorded in the file until IDL is exited or the JOURNAL command is entered without an argument.
As an example of Journaling in IDL, consider the following IDL statements:
JOURNAL, 'demo.pro'
PRINT, 'Enter a number:'
READ, Z
JOURNAL, '; This was inserted with JOURNAL.'
PRINTF, !JOURNAL, '; This was inserted with PRINTF.'
JOURNAL
If these statements are executed by a user named Doug on a Sun workstation named quixote, the resulting journal file demo.pro will look like the following:
PRINT, 'Enter a number:'
READ, Z
PRINTF, !JOURNAL, '; This was inserted with PRINTF.'
Note that the input data to the READ statement is shown as a comment. In addition, the statement to insert the text using JOURNAL does not appear, while the statement using PRINTF does appear.
Syntax
JOURNAL [, Arg] [, /ALL]
Arguments
Arg
A string containing the name of the journal file to be opened or text to be written to an open journal file. If Arg is not supplied, and a journal file is not already open, the file idlsave.pro is used. Once journaling is enabled, a call to JOURNAL with Arg supplied causes Arg to be written into the journal file. Calling JOURNAL without Arg while journaling is in progress closes the journal file and ends the logging process.
Keywords
ALL
By default, the journal only contains IDL commands and output that comes directly from a command such as PRINT. If the ALL keyword is set then the journal will also contain informational messages such as compiled routine names and output from SAVE and RESTORE.
Version History
Original |
Introduced |
8.7 |
Added ALL keyword.
|
See Also
RESTORE, SAVE