output/syslog: Refactor syslog definitions

pull/6395/head
Jeff Lucovsky 4 years ago committed by Victor Julien
parent be9fbe3230
commit 98d4f9eaa4

@ -52,9 +52,6 @@
#ifndef OS_WIN32
#define DEFAULT_ALERT_SYSLOG_FACILITY_STR "local0"
#define DEFAULT_ALERT_SYSLOG_FACILITY LOG_LOCAL0
#define DEFAULT_ALERT_SYSLOG_LEVEL LOG_ERR
#define MODULE_NAME "AlertSyslog"
static int alert_syslog_level = DEFAULT_ALERT_SYSLOG_LEVEL;

@ -30,10 +30,6 @@
#include "output-eve-syslog.h"
#include "util-syslog.h"
#define DEFAULT_ALERT_SYSLOG_FACILITY_STR "local0"
#define DEFAULT_ALERT_SYSLOG_FACILITY LOG_LOCAL0
#define DEFAULT_ALERT_SYSLOG_LEVEL LOG_INFO
#ifdef OS_WIN32
void SyslogInitialize(void)
{
@ -113,8 +109,5 @@ void SyslogInitialize(void)
plugin_data->Init = SyslogInit;
plugin_data->Deinit = SyslogDeInit;
plugin_data->Write = SyslogWrite;
if (!SCRegisterEveFileType(plugin_data)) {
FatalError(SC_ERR_PLUGIN, "Failed to register EVE output: %s", OUTPUT_NAME);
}
}
#endif /* !OS_WIN32 */

@ -71,9 +71,6 @@
#include "suricata-plugin.h"
#define DEFAULT_LOG_FILENAME "eve.json"
#define DEFAULT_ALERT_SYSLOG_FACILITY_STR "local0"
#define DEFAULT_ALERT_SYSLOG_FACILITY LOG_LOCAL0
#define DEFAULT_ALERT_SYSLOG_LEVEL LOG_INFO
#define MODULE_NAME "OutputJSON"
#define MAX_JSON_SIZE 2048

@ -28,4 +28,10 @@
SCEnumCharMap *SCSyslogGetFacilityMap(void);
SCEnumCharMap *SCSyslogGetLogLevelMap(void);
#ifndef OS_WIN32
#define DEFAULT_ALERT_SYSLOG_FACILITY_STR "local0"
#define DEFAULT_ALERT_SYSLOG_FACILITY LOG_LOCAL0
#define DEFAULT_ALERT_SYSLOG_LEVEL LOG_ERR
#endif
#endif /* UTIL_SYSLOG_H */

Loading…
Cancel
Save