ansys::dpf::core::logging::LoggerConfig Class Reference
Last update: 16.07.2025The configuration associated to a Logger. It allows setting the log level and the sinks of a logger. More...
#include <dpf_api.h>
Public Member Functions | |
| LoggerConfig () | |
| Construct a new Logger Config object. | |
| eLogLevel | getLogLevel () const |
| Get the loglevel for the Logger. More... | |
| std::set< eLoggerSink > const & | getSinks () const |
| Get the list of sink types supported by the Logger. More... | |
| LoggerConfig & | withLogLevel (eLogLevel log_level) |
| Sets the log level for the Logger. More... | |
| LoggerConfig & | withSinks (eLoggerSink sink) |
| Sets a single sink for the Logger to write to. More... | |
| LoggerConfig & | withSinks (std::set< eLoggerSink > const &sinks) |
| Sets a list of sinks for the Logger to write to. More... | |
Static Public Member Functions | |
| static LoggerConfig | defaultConfig () |
| Returns the default config for logging. More... | |
Detailed Description
The configuration associated to a Logger. It allows setting the log level and the sinks of a logger.
Member Function Documentation
◆ defaultConfig()
|
static |
Returns the default config for logging.
- Returns
- LoggerConfig
◆ getLogLevel()
| eLogLevel ansys::dpf::core::logging::LoggerConfig::getLogLevel | ( | ) | const |
Get the loglevel for the Logger.
- Returns
- eLogLevel
◆ getSinks()
| std::set< eLoggerSink > const & ansys::dpf::core::logging::LoggerConfig::getSinks | ( | ) | const |
Get the list of sink types supported by the Logger.
- Returns
- std::set<eLoggerSink> const&
◆ withLogLevel()
| LoggerConfig & ansys::dpf::core::logging::LoggerConfig::withLogLevel | ( | eLogLevel | log_level | ) |
◆ withSinks() [1/2]
| LoggerConfig & ansys::dpf::core::logging::LoggerConfig::withSinks | ( | eLoggerSink | sink | ) |
Sets a single sink for the Logger to write to.
- Parameters
-
sink The sink to write to.
- Returns
- LoggerConfig&
◆ withSinks() [2/2]
| LoggerConfig & ansys::dpf::core::logging::LoggerConfig::withSinks | ( | std::set< eLoggerSink > const & | sinks | ) |
Sets a list of sinks for the Logger to write to.
- Parameters
-
sinks The sinks to write to.
- Returns
- LoggerConfig&