Message
Most of the applications in HOPS4 pass messages to stdout via the messaging library. This library controls the verbosity and formatting
of program messages and has several configuration options that can be applied at either compile time or run time.
Compile Time Options
These following options can be toggled via ccmake terminal GUI. If they are changed, the software must be re-built in order to take effect.
Option |
Description |
Default |
|---|---|---|
HOPS_ENABLE_DEBUG_MSG |
This option allows the user to entirely turn on/off additional debug messages by removing them from compilation. |
ON |
HOPS_ENABLE_EXTRA_VERBOSE_MSG |
When enabled, this option adds additional (file,line) origin information to all messages. |
OFF |
HOPS_ENABLE_COLOR_MSG |
Enables color messages on the terminal, message color is determined by type (debug, info, status, warning, error, fatal). |
ON |
Run Time Options
Option |
Description |
|---|---|
|
Limit the allowed message categories to only those which the user specifies. Available categories:
If not specified, all categories are allowed.
Multiple categories can be specified as a comma separate list (e.g. |
|
Message verbosity level, range: |
Usage
Application and library code emits messages via a family of severity macros, each
tied to a MHO_MessageLevel enumerator, taking a message category key and content
terminated by the eom stream manipulator:
msg_status("fringe", "starting fringe fit for scan " << scan_name << eom);
The available severity macros, from most to least severe, are:
Macro |
Level |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
See the implementation details of the class hops::MHO_Message for further information on messaging configuration.