Journaling in IRAF?
A. Springmann wrote on Jun 29, 2006
Hi all,
I was wondering if IRAF has a journaling function that records sessions, similar to the one that IDL has.
Any help or advice would be much appreciated.
Thanks,
- a.s.
I was wondering if IRAF has a journaling function that records sessions, similar to the one that IDL has.
Any help or advice would be much appreciated.
Thanks,
- a.s.
Mike Fitzpatrick wrote on Jun 29, 2006
I'm not quite sure its the same thing, but there are CL parameter to control logging of a session, i.e.
When the 'keeplog' parameter is enabled the history is kept in the file specified by 'logfile'. The 'logmode' param lists all the things currently loggable, so to enable if just
Turn it off when you're done and see home$logfile.cl for results. There is also an 'stty playback' mode that we used to use for demos and test scripts.
Cheers,
-Mike
cl> lpar cl
:
:
(keeplog = no) Record all interactive commands in logfile?
(logfile = "home$logfile.cl") Name of the logfile
(logmode = "commands nobackground noerrors notrace") Logging control
When the 'keeplog' parameter is enabled the history is kept in the file specified by 'logfile'. The 'logmode' param lists all the things currently loggable, so to enable if just
cl> cl.keeplog=yesTurn it off when you're done and see home$logfile.cl for results. There is also an 'stty playback' mode that we used to use for demos and test scripts.
Cheers,
-Mike
Itso wrote on Jun 29, 2006
helpful but somehow it doesn't work for me.
I did these settings and at some point it was working. But then it all stopped. I went back to the cl parameters just to realize that they have been reset. After I put them back to keeping a log, it didn't work at all.
This is what I am doing:
And my login.cl file contains
so that my logfile is kept separately in each folder in which I work.
Any suggestions?
Thanks!
Itso
I did these settings and at some point it was working. But then it all stopped. I went back to the cl parameters just to realize that they have been reset. After I put them back to keeping a log, it didn't work at all.
This is what I am doing:
cl> lpar cl
:
:
(keeplog = yes) Record all interactive commands in logfile?
(logfile = "HDR$logfile.cl") Name of the logfile
And my login.cl file contains
set imdir = "HDR$"
so that my logfile is kept separately in each folder in which I work.
Any suggestions?
Thanks!
Itso
Mike Fitzpatrick wrote on Jun 29, 2006
The "HDR" logical path is only used for image pixel files and isn't an equivalent to the current-working-directory. If you want to keep the log in the current dir, just set the 'logfile' param to be the filename 'logfile.cl' and it will be written to the current directory (even after you change directories).
Cheers,
-Mike
Cheers,
-Mike
Itso wrote on Jun 29, 2006
Nice! Works again! Do you have any idea why it has switched off and does it usually switch off when one logs out and then logs in again?
Edit: Yes, it does switch off when I log out. Is there a way to make logging permanent?
Edit: Yes, it does switch off when I log out. Is there a way to make logging permanent?
Mike Fitzpatrick wrote on Jun 29, 2006
The CL params apparently aren't learned, but that seems like a bug to me and I'll check up on it. In the meantime, you can simply reset the values in your login.cl/loginuser.cl file, e.g. add the following before the 'keep' statement:
-Mike
cl.keeplog=yes
cl.logfile=log.cl-Mike
Itso wrote on Jun 29, 2006
Great! This seems to work now.
Just one comment to others that might try to use this solution.
The correct code that has to be in the login.cl file should be:
That is, the name of the logfile should be in quotation marks. Otherwise it reports an error and IRAF refuses to start.
Thanks again!
Itso
Just one comment to others that might try to use this solution.
The correct code that has to be in the login.cl file should be:
cl.keeplog=yes
cl.logfile="log.cl"That is, the name of the logfile should be in quotation marks. Otherwise it reports an error and IRAF refuses to start.
Thanks again!
Itso
Last post on Jun 29, 2006