    

 ## On this page

  

 

 # ansys::dpf::core::logging::LoggerConfig Class Reference

 Last update: 16.07.2025 

The configuration associated to a [Logger](classansys_1_1dpf_1_1core_1_1logging_1_1Logger.xhtml "Logger interface. All public methods are thread-safe."). It allows setting the log level and the sinks of a logger. [More...](classansys_1_1dpf_1_1core_1_1logging_1_1LoggerConfig.xhtml#details)

`#include <dpf_api.h>`

## <a id="pub-methods" name="pub-methods"></a>Public Member Functions

<a id="a4b15b9ab50086d77382b8a6f4e26e04a" name="a4b15b9ab50086d77382b8a6f4e26e04a"></a> **LoggerConfig** () Construct a new [Logger](classansys_1_1dpf_1_1core_1_1logging_1_1Logger.xhtml "Logger interface. All public methods are thread-safe.") Config object.   
 eLogLevel [getLogLevel](classansys_1_1dpf_1_1core_1_1logging_1_1LoggerConfig.xhtml#a28a5fcb631af6a4b6fce9accc454d0b6) () const Get the loglevel for the [Logger](classansys_1_1dpf_1_1core_1_1logging_1_1Logger.xhtml "Logger interface. All public methods are thread-safe."). [More...](classansys_1_1dpf_1_1core_1_1logging_1_1LoggerConfig.xhtml#a28a5fcb631af6a4b6fce9accc454d0b6)  
 std::set&lt; eLoggerSink &gt; const &amp; [getSinks](classansys_1_1dpf_1_1core_1_1logging_1_1LoggerConfig.xhtml#a7e8c7c7932c1cae127097be0c7fd319b) () const Get the list of sink types supported by the [Logger](classansys_1_1dpf_1_1core_1_1logging_1_1Logger.xhtml "Logger interface. All public methods are thread-safe."). [More...](classansys_1_1dpf_1_1core_1_1logging_1_1LoggerConfig.xhtml#a7e8c7c7932c1cae127097be0c7fd319b)  
 [LoggerConfig](classansys_1_1dpf_1_1core_1_1logging_1_1LoggerConfig.xhtml) &amp; [withLogLevel](classansys_1_1dpf_1_1core_1_1logging_1_1LoggerConfig.xhtml#a2983b56f4fe817a94ee5be8b26cfdcf1) (eLogLevel log\_level) Sets the log level for the [Logger](classansys_1_1dpf_1_1core_1_1logging_1_1Logger.xhtml "Logger interface. All public methods are thread-safe."). [More...](classansys_1_1dpf_1_1core_1_1logging_1_1LoggerConfig.xhtml#a2983b56f4fe817a94ee5be8b26cfdcf1)  
 [LoggerConfig](classansys_1_1dpf_1_1core_1_1logging_1_1LoggerConfig.xhtml) &amp; [withSinks](classansys_1_1dpf_1_1core_1_1logging_1_1LoggerConfig.xhtml#a1a4aed950f872b32cea69ef415b2f7b7) (eLoggerSink sink) Sets a single sink for the [Logger](classansys_1_1dpf_1_1core_1_1logging_1_1Logger.xhtml "Logger interface. All public methods are thread-safe.") to write to. [More...](classansys_1_1dpf_1_1core_1_1logging_1_1LoggerConfig.xhtml#a1a4aed950f872b32cea69ef415b2f7b7)  
 [LoggerConfig](classansys_1_1dpf_1_1core_1_1logging_1_1LoggerConfig.xhtml) &amp; [withSinks](classansys_1_1dpf_1_1core_1_1logging_1_1LoggerConfig.xhtml#a141dbb92316f11466e18bdb9ffb1e21e) (std::set&lt; eLoggerSink &gt; const &amp;sinks) Sets a list of sinks for the [Logger](classansys_1_1dpf_1_1core_1_1logging_1_1Logger.xhtml "Logger interface. All public methods are thread-safe.") to write to. [More...](classansys_1_1dpf_1_1core_1_1logging_1_1LoggerConfig.xhtml#a141dbb92316f11466e18bdb9ffb1e21e)  
 ## <a id="pub-static-methods" name="pub-static-methods"></a>Static Public Member Functions

static [LoggerConfig](classansys_1_1dpf_1_1core_1_1logging_1_1LoggerConfig.xhtml) [defaultConfig](classansys_1_1dpf_1_1core_1_1logging_1_1LoggerConfig.xhtml#af32d34dcb6b85561e8afec9f3d7fcccf) () Returns the default config for logging. [More...](classansys_1_1dpf_1_1core_1_1logging_1_1LoggerConfig.xhtml#af32d34dcb6b85561e8afec9f3d7fcccf)  
 <a id="details" name="details"></a>## Detailed Description

The configuration associated to a [Logger](classansys_1_1dpf_1_1core_1_1logging_1_1Logger.xhtml "Logger interface. All public methods are thread-safe."). It allows setting the log level and the sinks of a logger.



## Member Function Documentation

<a id="af32d34dcb6b85561e8afec9f3d7fcccf" name="af32d34dcb6b85561e8afec9f3d7fcccf"></a>## [◆ ](#af32d34dcb6b85561e8afec9f3d7fcccf)defaultConfig()

 static [LoggerConfig](classansys_1_1dpf_1_1core_1_1logging_1_1LoggerConfig.xhtml) ansys::dpf::core::logging::LoggerConfig::defaultConfig  ( )   static 

Returns the default config for logging.

Returns[LoggerConfig](classansys_1_1dpf_1_1core_1_1logging_1_1LoggerConfig.xhtml "The configuration associated to a Logger. It allows setting the log level and the sinks of a logger.") 



<a id="a28a5fcb631af6a4b6fce9accc454d0b6" name="a28a5fcb631af6a4b6fce9accc454d0b6"></a>## [◆ ](#a28a5fcb631af6a4b6fce9accc454d0b6)getLogLevel()

 eLogLevel ansys::dpf::core::logging::LoggerConfig::getLogLevel  ( )  const

Get the loglevel for the [Logger](classansys_1_1dpf_1_1core_1_1logging_1_1Logger.xhtml "Logger interface. All public methods are thread-safe.").

ReturnseLogLevel 



<a id="a7e8c7c7932c1cae127097be0c7fd319b" name="a7e8c7c7932c1cae127097be0c7fd319b"></a>## [◆ ](#a7e8c7c7932c1cae127097be0c7fd319b)getSinks()

 std::set&lt; eLoggerSink &gt; const &amp; ansys::dpf::core::logging::LoggerConfig::getSinks  ( )  const

Get the list of sink types supported by the [Logger](classansys_1_1dpf_1_1core_1_1logging_1_1Logger.xhtml "Logger interface. All public methods are thread-safe.").

Returnsstd::set&lt;eLoggerSink&gt; const&amp; 



<a id="a2983b56f4fe817a94ee5be8b26cfdcf1" name="a2983b56f4fe817a94ee5be8b26cfdcf1"></a>## [◆ ](#a2983b56f4fe817a94ee5be8b26cfdcf1)withLogLevel()

 [LoggerConfig](classansys_1_1dpf_1_1core_1_1logging_1_1LoggerConfig.xhtml) &amp; ansys::dpf::core::logging::LoggerConfig::withLogLevel  ( eLogLevel  *log\_level*) 

Sets the log level for the [Logger](classansys_1_1dpf_1_1core_1_1logging_1_1Logger.xhtml "Logger interface. All public methods are thread-safe.").

Parameters log\_levelThe [Logger](classansys_1_1dpf_1_1core_1_1logging_1_1Logger.xhtml "Logger interface. All public methods are thread-safe.") loglevel. Returns[LoggerConfig](classansys_1_1dpf_1_1core_1_1logging_1_1LoggerConfig.xhtml "The configuration associated to a Logger. It allows setting the log level and the sinks of a logger.")&amp; 



<a id="a1a4aed950f872b32cea69ef415b2f7b7" name="a1a4aed950f872b32cea69ef415b2f7b7"></a>## [◆ ](#a1a4aed950f872b32cea69ef415b2f7b7)withSinks() \[1/2\]

 [LoggerConfig](classansys_1_1dpf_1_1core_1_1logging_1_1LoggerConfig.xhtml) &amp; ansys::dpf::core::logging::LoggerConfig::withSinks  ( eLoggerSink  *sink*) 

Sets a single sink for the [Logger](classansys_1_1dpf_1_1core_1_1logging_1_1Logger.xhtml "Logger interface. All public methods are thread-safe.") to write to.

Parameters sinkThe sink to write to. Returns[LoggerConfig](classansys_1_1dpf_1_1core_1_1logging_1_1LoggerConfig.xhtml "The configuration associated to a Logger. It allows setting the log level and the sinks of a logger.")&amp; 



<a id="a141dbb92316f11466e18bdb9ffb1e21e" name="a141dbb92316f11466e18bdb9ffb1e21e"></a>## [◆ ](#a141dbb92316f11466e18bdb9ffb1e21e)withSinks() \[2/2\]

 [LoggerConfig](classansys_1_1dpf_1_1core_1_1logging_1_1LoggerConfig.xhtml) &amp; ansys::dpf::core::logging::LoggerConfig::withSinks  ( std::set&lt; eLoggerSink &gt; const &amp;  *sinks*) 

Sets a list of sinks for the [Logger](classansys_1_1dpf_1_1core_1_1logging_1_1Logger.xhtml "Logger interface. All public methods are thread-safe.") to write to.

Parameters sinksThe sinks to write to. Returns[LoggerConfig](classansys_1_1dpf_1_1core_1_1logging_1_1LoggerConfig.xhtml "The configuration associated to a Logger. It allows setting the log level and the sinks of a logger.")&amp;