Skip to main content

DPF Cpp Client Library 2026 R1

Class ansys::dpf::core::logging::Logger

Last update: 25.03.2026

Logger interface. All public methods are thread-safe.

Members

Public functions

Function valid

bool ansys::dpf::core::logging::Logger::valid() const

Returns if the logger is valid. By design, the logging API will never error and there could be situations where a non-functional Logger instance will be returned. E.g if trying to register a logger with a name that is already registered or with an invalid name, or get a logger with a name which does not exist or is invalid. If the Logger is invalid, all method calls like flush() or log() will be NOPs.

Returns:

std::string

Return type: bool

Function name

std::string ansys::dpf::core::logging::Logger::name() const

Return the name of the Logger.

Returns:

std::string

Return type: std::string

Function flush

void ansys::dpf::core::logging::Logger::flush()

Flush all logger messages to the active sinks.

Return type: void

Function trace

void ansys::dpf::core::logging::Logger::trace(T const &message)

Logs a message with the trace loglevel.

Parameters:

  • message: The string to be logged.

Parameters:

  • T const & message

Return type: void

Function debug

void ansys::dpf::core::logging::Logger::debug(T const &message)

Logs a message with the debug loglevel.

Parameters:

  • message: The string to be logged.

Parameters:

  • T const & message

Return type: void

Function info

void ansys::dpf::core::logging::Logger::info(T const &message)

Logs a message with the info loglevel.

Parameters:

  • message: The string to be logged.

Parameters:

  • T const & message

Return type: void

Function warning

void ansys::dpf::core::logging::Logger::warning(T const &message)

Logs a message with the warning loglevel.

Parameters:

  • message: The string to be logged.

Parameters:

  • T const & message

Return type: void

Function error

void ansys::dpf::core::logging::Logger::error(T const &message)

Logs a message with the error loglevel.

Parameters:

  • message: The string to be logged.

Parameters:

  • T const & message

Return type: void

Function critical

void ansys::dpf::core::logging::Logger::critical(T const &message)

Logs a message with the critical loglevel.

Parameters:

  • message: The string to be logged.

Parameters:

  • T const & message

Return type: void

Function log

void ansys::dpf::core::logging::Logger::log(T const &message, eLogLevel loglevel)

Logs a message with the critical loglevel.

Parameters:

  • message: The string to be logged.

Parameters:

  • T const & message
  • eLogLevel loglevel

Return type: void

Connect with Ansys