NRAO Home > CASA > CASA Cookbook and User Reference Manual

1.5.2 Logging your session

The output from CASA commands is sent to the file casapy-YYYYMMDD-HHMMSS.log in your local directory, where YYYYMMDD-HHMMSS are the UT date and time when CASA was started up. New starts of CASA create new log files.


PIC

Figure 1.4: The CASA Logger GUI window under Linux. Note that under MacOSX a stripped down logger will instead appear as a Console.

_________________________________________________________________________________________


The output contained in casapy-YYYYMMDD-HHMMSS.log is also displayed in a separate window using the casalogger. Generally, the logger window will be brought up when casapy is started. If you do not want the logger GUI to appear, then start casapy using the --nologger option,

   casapy --nologger

which will run CASA in the terminal window. See § 1.5.2.1 for more startup options.


PIC

Figure 1.5: Using the Search facility in the casalogger. Here we have specified the string ’plotted’ and it has highlighted all instances in green.

_________________________________________________________________________________________


ALERT: Due to problems with Qt under MacOSX, we had to replace the GUI qtcasalogger with a special stripped down one that uses the Mac Console. This still has the important capabilities such as showing the messages and cut/paste. The following description is for the Linux version and thus should mostly be disregarded on OSX. On the Mac, you treat this as just another console window and use the usual mouse and hot-key actions to do what is needed.

The CASA logger window for Linux is shown in Figure 1.4. The main feature is the display area for the log text, which is divided into columns. The columns are:


PIC

Figure 1.6: Using the casalogger Filter facility. The log output can be sorted by Priority, Time, Origin, and Message. In this example we are filtering by Origin using ’clean’, and it now shows all the log output from the clean task.

_________________________________________________________________________________________



PIC

Figure 1.7: CASA Logger - Insert facility: The log output can be augmented by adding notes or comments during the reduction. The file should then be saved to disk to retain these changes.

_________________________________________________________________________________________


The casalogger GUI has a range of features, which include:

Other operations are also possible from the menu or buttons. Mouse “flyover” will reveal the operation of buttons, for example.

It is possible to change the file that the logging is directed to. Per default it is ’casapy-YYYYMMDD-HHMMSS.log’. But starting CASA with the option --logfile

casapy --logfile otherfile.log

will redirect the output pf the logger to the file ’otherfile.log’ (see also Sect. 1.5.2.1). The log file can also be changed during a CASA session. Type

CASA <15>: casalog.setlogfile(’otherfile.log’)

and you will redirect the output to the ’otherfile.log’ file. However, the logger GUI will still be monitoring the previous ’casapy-YYYYMMDD-HHMMSS.log’ file. To change it to the new file, go on File - Open and select the new log file, in our case ’otherfile.log’.

   1.5.2.1 Startup options for the logger
   1.5.2.2 Setting priority levels in the logger


More information about CASA may be found at the CASA web page

Copyright © 2010 Associated Universities Inc., Washington, D.C.

This code is available under the terms of the GNU General Public Lincense


Home | Contact Us | Directories | Site Map | Help | Privacy Policy | Search