ifw-daq
2.1.0-pre1
IFW Data Acquisition modules
common
libdaq
src
include
daq
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
15
namespace
daq
{
16
17
/**
18
* A simple daq::ObservableEventLog observer that logs observed events to provided logger.
19
*
20
* @ingroup daq_common_libdaq
21
*/
22
class
EventLogObserverLogger
{
23
public
:
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
31
private
:
32
log4cplus::Logger m_logger;
33
};
34
35
}
// namespace daq
36
#endif // #ifndef OCM_DAQ_EVENT_LOG_OBSERVER_HPP_
daq::EventLogObserverLogger::EventLogObserverLogger
EventLogObserverLogger(log4cplus::Logger logger)
Definition:
eventLogObserver.cpp:19
daq
Definition:
asyncProcess.cpp:15
eventLog.hpp
Contains declaration for EventLog, ObservableEventLog and related events.
daq::EventLogObserverLogger::operator()
void operator()(EventLog::EventType const &event) noexcept
Observer callback that immediately logs the event.
Definition:
eventLogObserver.cpp:26
daq::EventLog::EventType
std::variant< ActionEvent, UserActionEvent, GenericEvent, ErrorEvent > EventType
Definition:
eventLog.hpp:90
daq::EventLogObserverLogger
A simple daq::ObservableEventLog observer that logs observed events to provided logger.
Definition:
eventLogObserver.hpp:22
Generated by
1.8.20