#include <logging_manager.h>
Public Member Functions | |
| LoggingManager () | |
| ~LoggingManager () override | |
| void | initialize (const bool) override |
| Prepare manager for operation. | |
| void | finalize (const bool) override |
| Take down manager after operation. | |
| void | set_status (const Dictionary &) override |
| Set the status of the manager. | |
| void | get_status (Dictionary &) override |
| Retrieve the status of the manager. | |
| void | register_logging_client (const deliver_logging_event_ptr callback) |
| Register a logging client. | |
| void | publish_log (const VerbosityLevel, const std::string &, const std::string &, const std::string &, const size_t) const |
| Create a LoggingEvent. | |
| bool | dict_miss_is_error () const |
| Return true if missing access to dictionary should be considered an error. | |
| VerbosityLevel | verbosity () const |
Public Member Functions inherited from nest::ManagerInterface | |
| ManagerInterface (ManagerInterface const &)=delete | |
| void | operator= (ManagerInterface const &)=delete |
| ManagerInterface () | |
| virtual | ~ManagerInterface () |
| virtual void | prepare () |
| virtual void | cleanup () |
Private Member Functions | |
| void | deliver_logging_event_ (const LoggingEvent &event) const |
| Delivers a LoggingEvent to all registered clients. | |
| void | default_logging_callback_ (const LoggingEvent &event) const |
Private Attributes | |
| std::vector< deliver_logging_event_ptr > | client_callbacks_ |
| VerbosityLevel | logging_level_ |
| bool | dict_miss_is_error_ |
| whether to throw exception on missed dictionary entries | |
| nest::LoggingManager::LoggingManager | ( | ) |
|
override |
|
private |
References nest::LoggingEvent::severity, and nest::WARNING.
Referenced by deliver_logging_event_().
|
private |
Delivers a LoggingEvent to all registered clients.
It iterates all callback from the client_callbacks_ and calls it with the LoggingEvent as argument.
References client_callbacks_, and default_logging_callback_().
Referenced by publish_log().
|
inline |
Return true if missing access to dictionary should be considered an error.
References dict_miss_is_error_.
|
overridevirtual |
Take down manager after operation.
After this method has completed, all dynamic data structures created by the manager shall be deallocated and containers emptied. Plain variables need not be reset.
| adjust_number_of_threads_or_rng_only | Pass true if calling from kernel_manager::change_number_of_threads() to limit operations to those necessary for thread adjustment. |
Implements nest::ManagerInterface.
|
overridevirtual |
Retrieve the status of the manager.
Implements nest::ManagerInterface.
References nest::names::dict_miss_is_error(), dict_miss_is_error_, logging_level_, and nest::names::verbosity().
|
overridevirtual |
Prepare manager for operation.
After this method has completed, the manager should be completely initialized and "ready for action".
| adjust_number_of_threads_or_rng_only | Pass true if calling from kernel_manager::change_number_of_threads() or RandomManager::get_status() to limit operations to those necessary for thread adjustment or switch or re-seeding of RNG. |
Implements nest::ManagerInterface.
References dict_miss_is_error_.
| void nest::LoggingManager::publish_log | ( | const VerbosityLevel | s, |
| const std::string & | fctn, | ||
| const std::string & | msg, | ||
| const std::string & | file, | ||
| const size_t | line | ||
| ) | const |
Create a LoggingEvent.
This function creates a LoggingEvent that will be delivered to all registered logging clients, if the severity is above the set logging level. Do not use this function to do actual logging in the source code, instead use the LOG() function provided by the logging.h header in libnestutil.
References deliver_logging_event_(), and logging_level_.
Referenced by nest::message().
| void nest::LoggingManager::register_logging_client | ( | const deliver_logging_event_ptr | callback | ) |
Register a logging client.
Register a callback function that will receive all subsequent LoggingEvents. For the method signature see logging.h .
References client_callbacks_.
Referenced by nest::register_logger_client().
|
overridevirtual |
Set the status of the manager.
Implements nest::ManagerInterface.
References nest::names::dict_miss_is_error(), dict_miss_is_error_, logging_level_, Dictionary::update_value(), and nest::names::verbosity().
|
inline |
References logging_level_.
Referenced by nest::LoggingEvent::nest_verbosity_level().
|
private |
Referenced by deliver_logging_event_(), and register_logging_client().
|
private |
whether to throw exception on missed dictionary entries
Referenced by dict_miss_is_error(), get_status(), initialize(), and set_status().
|
private |
Referenced by get_status(), publish_log(), set_status(), and verbosity().