![]() |
COOLFluiD
Release kernel
COOLFluiD is a Collaborative Simulation Environment (CSE) focused on complex MultiPhysics simulations.
|
Main class of the logging system. More...
#include <Log.hpp>
Inherits noncopyable.
Public Member Functions | |
| void | initiate () |
| Initiates the log environment base on the Environment component maintained by the Core. More... | |
| LogStream & | Info (const CodeLocation &place) |
| Gives the info stream. More... | |
| LogStream & | Error (const CodeLocation &place) |
| Gives the error stream. More... | |
| LogStream & | Warn (const CodeLocation &place) |
| Gives the warning stream. More... | |
| LogStream & | Debug (const CodeLocation &place) |
| Gives the debug stream. More... | |
| LogStream & | getStream (LogLevel type) |
| void | openFiles () |
| Creates file descriptors and gives them to streams. More... | |
| void | set_log_level (const Uint log_level) |
Static Public Member Functions | |
| static Logger & | instance () |
Gives the current Logger instance. More... | |
| static std::string | type_name () |
Private Member Functions | |
| Logger () | |
| Constructor. More... | |
| ~Logger () | |
| Destructor. More... | |
Private Attributes | |
| std::map< LogLevel, LogStream * > | m_streams |
| Managed streams. More... | |
Main class of the logging system.
This class manages all streams used for logs. This class is a singleton.
Logger manages 4 streams: info, error, warning, debug. These streams differ on the type of messages they forward. By default, only streams ERROR, WARNING, INFO will be outputted. This can be changed using Logger::set_log_level(). By default no file is open. Once an MPI environment has been initialized, openFiles() can be called. Two files descriptors are created: one for a log file and another one for a trace file; respectively output-pi.log and output-pi.trace, where i if the MPI rank number).
| LogStream & Debug | ( | const CodeLocation & | place | ) |
| LogStream & Error | ( | const CodeLocation & | place | ) |
| LogStream & Info | ( | const CodeLocation & | place | ) |
| void initiate | ( | ) |
Initiates the log environment base on the Environment component maintained by the Core.
|
static |
| void openFiles | ( | ) |
|
inlinestatic |
| LogStream & Warn | ( | const CodeLocation & | place | ) |
1.8.9.1
|
Send comments to: COOLFluiD Web Admin |