... | @@ -922,7 +922,24 @@ zpbMal = mal.loadMal ("zpb", {"zpb.log4cplus.filename":"/path/to/mal-log4cplus.c |
... | @@ -922,7 +922,24 @@ zpbMal = mal.loadMal ("zpb", {"zpb.log4cplus.filename":"/path/to/mal-log4cplus.c |
|
With [ECII-246](https://jira.eso.org/browse/ECII-246), it is possible to change the log levels of the MAL loggers at run-time via a method call:
|
|
With [ECII-246](https://jira.eso.org/browse/ECII-246), it is possible to change the log levels of the MAL loggers at run-time via a method call:
|
|
|
|
|
|
```plaintext
|
|
```plaintext
|
|
|
|
#include <mal/util/MalLoggingUtil.hpp>
|
|
::elt::mal::util::logging::setLogLevelForLoggers( ... )
|
|
::elt::mal::util::logging::setLogLevelForLoggers( ... )
|
|
|
|
|
|
|
|
// set all mal loggers to INFO...
|
|
|
|
std::vector<elt::mal::util::logging::LoggerInfo> loggers = elt::mal::util::logging::getLoggers();
|
|
|
|
std::vector<elt::mal::util::logging::LoggerInfo> info;
|
|
|
|
for (auto const& logger : loggers) {
|
|
|
|
info.push_back(elt::mal::util::logging::LoggerInfo(logger.loggerName, ::log4cplus::INFO_LOG_LEVEL));
|
|
|
|
}
|
|
|
|
elt::mal::util::logging::setLogLevelForLoggers(info);
|
|
|
|
|
|
|
|
// print all mal loggers and log level
|
|
|
|
loggers = elt::mal::util::logging::getLoggers();
|
|
|
|
std::cout << "Loggers:\n";
|
|
|
|
for (auto const& logger : loggers) {
|
|
|
|
std::cout << "\t" << logger.loggerName << ": " << logger.logLevel << std::endl;
|
|
|
|
}
|
|
|
|
|
|
```
|
|
```
|
|
|
|
|
|
The allowed logger names are listed below.
|
|
The allowed logger names are listed below.
|
... | | ... | |