#include <messages.h>
Public Member Functions | |
bool | valid () |
Check if artsmessages contains valid message levels. | |
bool | sufficient_priority_agenda (Index priority) |
Does the current message have sufficient priority for agenda? | |
bool | sufficient_priority_screen (Index priority) |
Does the current message have sufficient priority for screen? | |
bool | sufficient_priority_file (Index priority) |
Does the current message have sufficient priority for file? | |
template<class T> | |
void | Print (ostream &os, Index priority, const T &t) |
Print a message to stream and report file. | |
Public Attributes | |
Index | va |
Verbosity for agenda output. Can be 0-3. | |
Index | vs |
Verbosity for output to screen. Can be 0-3. | |
Index | vf |
Verbosity for output to file. Can be 0-3. |
This class controls the ARTS verbosity.
There are four different output streams: out0, out1, out2, and out3. They have different priority, out0 the highest, out3 the lowest.
The verbosity level can be set separately for file and screen output. In both cases the level can range from 0 to 3, where 0 = no output (except error messages), 1 = only out1, 2 = out1+out2, and 3 = all output.
For agenda output, the verbosity level can also be between 0 and 3. The condition for agenda output is evaluated in addition to the screen or file output condition. In other words, output from a sub-agenda will only be shown on the screen, if its priority is high enough for both the agenda verbosity setting, and the screen verbosity setting.
Definition at line 74 of file messages.h.
bool Messages::valid | ( | ) |
Check if artsmessages contains valid message levels.
Definition at line 62 of file messages.cc.
Referenced by set_reporting_level().
bool Messages::sufficient_priority_agenda | ( | Index | priority | ) |
Does the current message have sufficient priority for agenda?
priority | Priority of current message. |
Definition at line 77 of file messages.cc.
References va.
Referenced by Print().
bool Messages::sufficient_priority_screen | ( | Index | priority | ) |
Does the current message have sufficient priority for screen?
priority | Priority of current message. |
Definition at line 88 of file messages.cc.
References vs.
Referenced by Print().
bool Messages::sufficient_priority_file | ( | Index | priority | ) |
Does the current message have sufficient priority for file?
priority | Priority of current message. |
Definition at line 99 of file messages.cc.
References vf.
Referenced by Print().
void Messages::Print | ( | ostream & | os, | |
Index | priority, | |||
const T & | t | |||
) | [inline] |
Print a message to stream and report file.
The message is printed only if the priority is higher than specified in messages. (Low number means high priority.)
os | Stream to print to (cout or cerr). | |
priority | Priority of this message (0-3, 0=highest). | |
t | The stuff to print (can be of any type). |
Definition at line 91 of file messages.h.
References in_main_agenda, report_file, sufficient_priority_agenda(), sufficient_priority_file(), and sufficient_priority_screen().
Referenced by operator<<().
Verbosity for agenda output. Can be 0-3.
Definition at line 113 of file messages.h.
Referenced by main(), set_reporting_level(), and sufficient_priority_agenda().
Verbosity for output to screen. Can be 0-3.
Definition at line 115 of file messages.h.
Referenced by main(), set_reporting_level(), and sufficient_priority_screen().
Verbosity for output to file. Can be 0-3.
Definition at line 117 of file messages.h.
Referenced by main(), set_reporting_level(), and sufficient_priority_file().