3 years, 4 months ago
Highlighting or coloring output in MOOSE is now easy to use. There are several color macro names that can be inserted into any stream object.
<< "The following value is very important: "
<< COLOR_GREEN << _some_value << COLOR_DEFAULT << '\n';
- When using the color macros it is important to always switch the color back to the default using COLOR_DEFAULT before completing your stream output.
- MOOSE automatically disables color when the terminal type cannot be detected.
- By default mooseError() and mooseWarning() messages will be colored on your terminal.
- To manually disable coloring simply use the
--no-color option on the command line when running your application.
- The following colors macros are available for general use:
Share on Facebook