40 sqlite3Plugin(Parameters
const&);
49 void routePayload(ostringstream
const&,
mf::ErrorObj const&)
override;
65 sqlite3Plugin::~sqlite3Plugin()
70 connection_ =
nullptr;
73 sqlite3Plugin::sqlite3Plugin(Parameters
const&
ps)
74 : ELdestination{
ps().elDestConfig()}
100 sqlite3Plugin::routePayload(ostringstream
const& oss,
mf::ErrorObj const&
msg)
102 auto const& xid = msg.
xid();
103 string const& timestamp = format_.timestamp(msg.
timestamp());
104 string const& hostname = xid.
hostname();
105 string const& hostaddr = xid.hostaddr();
106 string const& severity = xid.severity().getName();
108 string const& app = xid.application();
109 long const&
pid = xid.pid();
111 string const& modname = xid.module();
112 string const& usrMsg =
113 !oss.str().compare(0, 1,
"\n") ? oss.str().erase(0, 1) : oss.str();
114 msgTable_->insert(timestamp,
130 return make_unique<sqlite3Plugin>(pset);
void msg(const char *fmt,...)
timeval timestamp() const
auto make_connection(std::string const &file_name, PolicyArgs &&...) -> Connection *
typename config_impl< T >::type Config
fhicl::Atom< std::string > filename
ELextendedID const & xid() const
static constexpr double ps
string const & GetIteration()
#define FHICL_PROVIDE_ALLOWED_CONFIGURATION(klass)
MAKE_MFPLUGIN_START(, pset)
std::string const & hostname() const