Responsible for logging.
More...
#include <managers/io/LogManager.h>
Responsible for logging.
Definition at line 28 of file LogManager.h.
◆ LogManager()
| gpr::io::LogManager::LogManager |
( |
| ) |
|
|
inline |
◆ ~LogManager()
| gpr::io::LogManager::~LogManager |
( |
| ) |
|
|
inline |
◆ enabled()
| bool gpr::io::LogManager::enabled |
( |
| ) |
const |
|
inlinenodiscardnoexcept |
Definition at line 42 of file LogManager.h.
43 {
44 return enabled_;
45 }
◆ operator<<()
template<typename T>
| LogManager & gpr::io::LogManager::operator<< |
( |
const T & | data | ) |
|
|
inline |
Writes data to the log.
- Parameters
-
- Returns
- Reference to this.
Definition at line 53 of file LogManager.h.
54 {
55 if (!enabled_) return *this;
56#ifdef GPR_LINALG_SCALAPACK
57 int rank = 0;
58 int init = 0;
59 MPI_Initialized(&init);
60 if (init) MPI_Comm_rank(MPI_COMM_WORLD, &rank);
61 if (rank != 0) return *this;
62#endif
63 std::clog << data;
64 return *this;
65 }
◆ setEnabled()
| void gpr::io::LogManager::setEnabled |
( |
bool | enabled | ) |
|
|
inlinenoexcept |
Switch the log on or off. A log starts enabled. A disabled log discards what is written to it.
Definition at line 37 of file LogManager.h.
38 {
40 }
bool enabled() const noexcept
The documentation for this class was generated from the following file: