ifw-daq 3.1.0
IFW Data Acquisition modules
Loading...
Searching...
No Matches
eventLogObserver.hpp
Go to the documentation of this file.
1/**
2 * @file
3 * @ingroup daq_common_libdaq
4 * @copyright 2022 ESO - European Southern Observatory
5 *
6 * @brief Contains declaration for EventLogObserverLogger
7 */
8#ifndef OCM_DAQ_EVENT_LOG_OBSERVER_HPP_
9#define OCM_DAQ_EVENT_LOG_OBSERVER_HPP_
10#include <log4cplus/logger.h>
11
12#include "eventLog.hpp"
13
14
15namespace daq {
16
17/**
18 * A simple daq::ObservableEventLog observer that logs observed events to provided logger.
19 *
20 * @ingroup daq_common_libdaq
21 */
23public:
24 EventLogObserverLogger(log4cplus::Logger logger);
25
26 /**
27 * Observer callback that immediately logs the event.
28 */
29 void operator()(EventLog::EventType const& event) noexcept;
30
31private:
32 log4cplus::Logger m_logger;
33};
34
35} // namespace daq
36#endif // #ifndef OCM_DAQ_EVENT_LOG_OBSERVER_HPP_
A simple daq::ObservableEventLog observer that logs observed events to provided logger.
void operator()(EventLog::EventType const &event) noexcept
Observer callback that immediately logs the event.
Contains declaration for EventLog, ObservableEventLog and related events.
std::variant< ActionEvent, UserActionEvent, GenericEvent, ErrorEvent > EventType
Definition: eventLog.hpp:90