The IDL_Logit() function can be used to add lines of output to the journal log file:
void IDL_Logit(char *s)
A pointer to a NULL terminated string to be added to the journal log file.
Note: If a journal log file is currently open, this function writes the specified string to it on a new line. If no journal file is open, IDL_Logit() returns quietly. The only way to open or close the journal file is via the user-system-level JOURNAL procedure.