|
|||
NRAO Home > CASA > CASA Cookbook and User Reference Manual |
|
1.5.2.2 Setting priority levels in the logger
Logger messages are assigned a Priority Level when generated within CASA. The current levels of Priority are:
- SEVERE — errors;
- WARN — warnings;
- INFO — basic information every user should be aware of or has requested;
- INFO1 — information possibly helpful to the user;
- INFO2 — details the power user might want to see;
- INFO3 — even more details;
- INFO4 — lowest level of non-debugging information;
- DEBUGGING — most “important” debugging messages;
- DEBUG1 — more details;
- DEBUG2 — lowest level of debugging messages.
The “debugging” levels are intended for the developers use.
There is a threshold for which these messages are written to the casapy-YYYYMMDD-HHMMSS.log file and are thus visible in the logger. By default, only messages at level INFO and above are logged. The user can change the threshold using the casalog.filter method. This takes a single string argument of the level for the threshold. The level sets the lowest priority that will be generated, and all messages of this level or higher will go into the casapy-YYYYMMDD-HHMMSS.log file.
Some examples:
casalog.filter(’INFO2’) # should satisfy even advanced users
casalog.filter(’INFO4’) # all INFOx messages
casalog.filter(’DEBUG2’) # all messages including debugging
WARNING: Setting the threshold to DEBUG2 will put lots of messages in the log!
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