28class SENSORRING_API Logger {
57 void log(const LogVerbosity verbosity, const std::
string& msg) const;
65 void log(const LogVerbosity verbosity, const std::stringstream& msg) const;
71 mutable std::recursive_mutex _client_mutex;
72 using LockGuard = std::lock_guard<std::recursive_mutex>;
LoggerClient that can be registered with the Logger to receive log messages.
Control the import and export of Windows DLL symbols.
Observer interface of the Logger class. Defines the callback method that is triggered by the Logger.
Definition LoggerClient.hpp:51
void unregisterClient(LoggerClient *client) noexcept
Unregister a new LoggerClient to no longer be notified of log messages.
void registerClient(LoggerClient *client) noexcept
Register a new LoggerClient to be notified of future log messages.
void log(const LogVerbosity verbosity, const std::string &msg) const
Log a message that will be relayed to all registered observers.
~Logger()=default
Destructor.
static Logger * getInstance() noexcept
Get a reference to the instance of the Logger singleton.