Loggable Class Reference#
|
Reference API
|
#include <ginkgo/core/log/logger.hpp>
Public Member Functions | |
| virtual void | add_logger (std::shared_ptr< const Logger > logger)=0 |
| virtual void | remove_logger (const Logger *logger)=0 |
| void | remove_logger (ptr_param< const Logger > logger) |
| virtual const std::vector< std::shared_ptr< const Logger > > & | get_loggers () const =0 |
| virtual void | clear_loggers ()=0 |
Detailed Description
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.
Member Function Documentation
◆ add_logger()
|
pure virtual |
Adds a new logger to the list of subscribed loggers.
- Parameters
-
logger the logger to add
Implemented in gko::Executor, gko::log::EnableLogging< ConcreteLoggable, PolymorphicBase >, gko::log::EnableLogging< Executor >, and gko::log::EnableLogging< PolymorphicObject >.
◆ clear_loggers()
|
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 >.
◆ get_loggers()
|
pure virtual |
Returns the vector containing all loggers registered at this object.
- Returns
- the vector containing all registered loggers.
Implemented in gko::log::EnableLogging< ConcreteLoggable, PolymorphicBase >, gko::log::EnableLogging< Executor >, and gko::log::EnableLogging< PolymorphicObject >.
◆ remove_logger()
|
pure virtual |
Removes a logger from the list of subscribed loggers.
- Parameters
-
logger the logger to remove
- Note
- The comparison is done using the logger's object unique identity. Thus, two loggers constructed in the same way are not considered equal.
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().
The documentation for this class was generated from the following file:
- ginkgo/core/log/logger.hpp
Generated by