![]() |
Ginkgo Generated from branch based on main. Ginkgo version 1.9.0
A numerical linear algebra library targeting many-core architectures
|
Loggable class is an interface which should be implemented by classes wanting to support logging. More...
#include <ginkgo/core/log/logger.hpp>
Public Member Functions | |
virtual void | add_logger (std::shared_ptr< const Logger > logger)=0 |
Adds a new logger to the list of subscribed loggers. | |
virtual void | remove_logger (const Logger *logger)=0 |
Removes a logger from the list of subscribed loggers. | |
void | remove_logger (ptr_param< const Logger > logger) |
virtual const std::vector< std::shared_ptr< const Logger > > & | get_loggers () const =0 |
Returns the vector containing all loggers registered at this object. | |
virtual void | clear_loggers ()=0 |
Remove all loggers registered at this object. | |
Loggable class is an interface which should be implemented by classes wanting to support logging.
For most cases, one can rely on the EnableLogging mixin which provides a default implementation of this interface.
|
pure virtual |
Adds a new logger to the list of subscribed loggers.
logger | the logger to add |
Implemented in gko::Executor, gko::log::EnableLogging< ConcreteLoggable, PolymorphicBase >, gko::log::EnableLogging< Executor >, and gko::log::EnableLogging< PolymorphicObject >.
|
pure virtual |
Remove all loggers registered at this object.
Implemented in gko::log::EnableLogging< ConcreteLoggable, PolymorphicBase >, gko::log::EnableLogging< Executor >, and gko::log::EnableLogging< PolymorphicObject >.
|
pure virtual |
Returns the vector containing all loggers registered at this object.
Implemented in gko::log::EnableLogging< ConcreteLoggable, PolymorphicBase >, gko::log::EnableLogging< Executor >, and gko::log::EnableLogging< PolymorphicObject >.
|
pure virtual |
Removes a logger from the list of subscribed loggers.
logger | the logger to remove |
Implemented in gko::Executor, gko::log::EnableLogging< ConcreteLoggable, PolymorphicBase >, gko::log::EnableLogging< Executor >, and gko::log::EnableLogging< PolymorphicObject >.
References gko::ptr_param< T >::get(), and remove_logger().
Referenced by remove_logger().