forked from sonic-net/sonic-buildimage
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrsyslog_plugin.h
More file actions
34 lines (27 loc) · 722 Bytes
/
Copy pathrsyslog_plugin.h
File metadata and controls
34 lines (27 loc) · 722 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#ifndef RSYSLOG_PLUGIN_H
#define RSYSLOG_PLUGIN_H
#include <string>
#include "syslog_parser.h"
#include "common/events.h"
#include "common/logger.h"
using namespace std;
using namespace swss;
/**
* Rsyslog Plugin will utilize an instance of a syslog parser to read syslog messages from rsyslog.d and will continuously read from stdin
* A plugin instance is created for each container/host.
*
*/
class RsyslogPlugin {
public:
bool onInit();
bool onMessage(string msg);
void run();
RsyslogPlugin(string module_name, string regex_path);
private:
SyslogParser* m_parser;
event_handle_t m_event_handle;
string m_regex_path;
string m_module_name;
bool createRegexList();
};
#endif