38#include "utility/demangle.hpp"
42namespace utility::logging
54 template<
typename ClassType, InheritFromLogger LoggerType>
class Loggable
58 std::unique_ptr<LoggerType> _logger;
66 , _logger(std::make_unique<LoggerType>(_name))
75 : _name(std::move(other._name))
76 , _logger(std::move(other._logger))
88 _name = std::move(other._name);
89 _logger = std::move(other._logger);
Mixin base class providing logging capabilities to derived classes.
Loggable & operator=(Loggable &&other) noexcept
Move assignment operator for Loggable.
Loggable(Loggable &&other) noexcept
Move constructor for Loggable.
Loggable(void)
Construct a Loggable with the specified LoggerType.
LoggerType & getLogger(void) const
Get the internal logger.
virtual ~Loggable(void)=default
Virtual destructor for proper cleanup.
LoggerType & getLogger(void)
Get the internal logger.
Logging interface with levels, source-location metadata, and stream-style output.
The utility namespace contains classes and functions for the utility project.
std::string demangle(void)
Demangles a C++ type name for better readability.