> ## Documentation Index
> Fetch the complete documentation index at: https://developer.synopsys.com/llms.txt
> Use this file to discover all available pages before exploring further.

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

![][C++]
![][public]

The configuration associated to a [Logger](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/classansys-dpf-core-logging-logger.md). It allows setting the log level and the sinks of a logger.

## Members

* [defaultConfig](#classansys-dpf-core-logging-loggerconfig-1af32d34dcb6b85561e8afec9f3d7fcccf)
* [getLogLevel](#classansys-dpf-core-logging-loggerconfig-1a28a5fcb631af6a4b6fce9accc454d0b6)
* [getSinks](#classansys-dpf-core-logging-loggerconfig-1a7e8c7c7932c1cae127097be0c7fd319b)
* [LoggerConfig](#classansys-dpf-core-logging-loggerconfig-1a4b15b9ab50086d77382b8a6f4e26e04a)
* [withLogLevel](#classansys-dpf-core-logging-loggerconfig-1a2983b56f4fe817a94ee5be8b26cfdcf1)
* [withSinks](#classansys-dpf-core-logging-loggerconfig-1a1a4aed950f872b32cea69ef415b2f7b7)
* [withSinks](#classansys-dpf-core-logging-loggerconfig-1a141dbb92316f11466e18bdb9ffb1e21e)

## Public functions

### Function LoggerConfig

![][public]

```cpp theme={null}
ansys::dpf::core::logging::LoggerConfig::LoggerConfig()
```

Construct a new [Logger](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/classansys-dpf-core-logging-logger.md) Config object.

**Return type**:

### Function getLogLevel

![][public]
![][const]

```cpp theme={null}
eLogLevel ansys::dpf::core::logging::LoggerConfig::getLogLevel() const
```

Get the loglevel for the [Logger](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/classansys-dpf-core-logging-logger.md).

**Returns**:

eLogLevel

**Return type**: eLogLevel

### Function getSinks

![][public]
![][const]

```cpp theme={null}
std::set< eLoggerSink > const  & ansys::dpf::core::logging::LoggerConfig::getSinks() const
```

Get the list of sink types supported by the [Logger](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/classansys-dpf-core-logging-logger.md).

**Returns**:

std::set\<eLoggerSink> const&

**Return type**: std::set\< eLoggerSink > const &

### Function withLogLevel

![][public]

```cpp theme={null}
LoggerConfig & ansys::dpf::core::logging::LoggerConfig::withLogLevel(eLogLevel log_level)
```

Sets the log level for the [Logger](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/classansys-dpf-core-logging-logger.md).

**Parameters**:

* **log\_level**: The [Logger](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/classansys-dpf-core-logging-logger.md) loglevel.

**Returns**:

[LoggerConfig](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/classansys-dpf-core-logging-loggerconfig.md)&

**Parameters**:

* eLogLevel **log\_level**

**Return type**: [LoggerConfig](#classansys-dpf-core-logging-loggerconfig-1a4b15b9ab50086d77382b8a6f4e26e04a) &

### Function withSinks

![][public]

```cpp theme={null}
LoggerConfig & ansys::dpf::core::logging::LoggerConfig::withSinks(eLoggerSink sink)
```

Sets a single sink for the [Logger](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/classansys-dpf-core-logging-logger.md) to write to.

**Parameters**:

* **sink**: The sink to write to.

**Returns**:

[LoggerConfig](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/classansys-dpf-core-logging-loggerconfig.md)&

**Parameters**:

* eLoggerSink **sink**

**Return type**: [LoggerConfig](#classansys-dpf-core-logging-loggerconfig-1a4b15b9ab50086d77382b8a6f4e26e04a) &

### Function withSinks

![][public]

```cpp theme={null}
LoggerConfig & ansys::dpf::core::logging::LoggerConfig::withSinks(std::set< eLoggerSink > const &sinks)
```

Sets a list of sinks for the [Logger](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/classansys-dpf-core-logging-logger.md) to write to.

**Parameters**:

* **sinks**: The sinks to write to.

**Returns**:

[LoggerConfig](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/classansys-dpf-core-logging-loggerconfig.md)&

**Parameters**:

* std::set\< eLoggerSink > const & **sinks**

**Return type**: [LoggerConfig](#classansys-dpf-core-logging-loggerconfig-1a4b15b9ab50086d77382b8a6f4e26e04a) &

## Public static functions

### Function defaultConfig

![][public]
![][static]

```cpp theme={null}
static LoggerConfig ansys::dpf::core::logging::LoggerConfig::defaultConfig()
```

Returns the default config for logging.

**Returns**:

[LoggerConfig](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/classansys-dpf-core-logging-loggerconfig.md)

**Return type**: [LoggerConfig](#classansys-dpf-core-logging-loggerconfig-1a4b15b9ab50086d77382b8a6f4e26e04a)

[C++]: https://img.shields.io/badge/language-C%2B%2B-blue "C++"

[const]: https://img.shields.io/badge/-const-lightblue "const"

[public]: https://img.shields.io/badge/-public-brightgreen "public"

[static]: https://img.shields.io/badge/-static-lightgrey "static"
