5 #ifndef HERALD_CONTACT_LOG_H
6 #define HERALD_CONTACT_LOG_H
8 #include "../sensor_delegate.h"
9 #include "payload_data_formatter.h"
10 #include "sensor_logger.h"
11 #include "../context.h"
13 namespace herald::data {
18 template <
typename ContextT,
typename PayloadDataFormatterT>
24 HLOGGERINIT(ctx,
"Sensor",
"contacts.log")
45 std::string csv(std::string toEscape)
const noexcept {
48 if (std::string::npos != toEscape.find(
",") ||
49 std::string::npos != toEscape.find(
"\"") ||
50 std::string::npos != toEscape.find(
"'") ||
51 std::string::npos != toEscape.find(
"’")) {
52 return "\"" + toEscape +
"\"";
57 std::string timestamp()
const noexcept {
58 return Date().iso8601DateTime();
62 PayloadDataFormatterT& fmt;
Definition: target_identifier.h:17
SensorType
Sensor type as qualifier for target identifier.
Definition: sensor_type.h:14