Go to the documentation of this file.
38 #define OUTPUT_NAME "syslog"
44 static int SyslogInit(
const ConfNode *conf,
const bool threaded,
void **init_data)
47 if (context == NULL) {
52 if (facility_s == NULL) {
59 " now using \"%s\" as syslog facility",
65 if (level_s != NULL) {
76 openlog(ident, LOG_PID | LOG_NDELAY, facility);
77 SCLogNotice(
"Syslog: facility %s, level %s, ident %s", facility_s, level_s, ident);
82 static int SyslogWrite(
83 const char *buffer,
const int buffer_len,
const void *init_data,
void *thread_data)
85 const Context *context = init_data;
91 static void SyslogDeInit(
void *init_data)
103 if (file_type == NULL) {
108 file_type->
Init = SyslogInit;
109 file_type->
Deinit = SyslogDeInit;
110 file_type->
Write = SyslogWrite;
#define syslog(__pri, __fmt, __param)
const char * name
The name of the output, used in the configuration.
int(* Write)(const char *buffer, const int buffer_len, const void *init_data, void *thread_data)
Called for each EVE log record.
#define DEFAULT_ALERT_SYSLOG_FACILITY
SCEnumCharMap * SCSyslogGetFacilityMap(void)
returns the syslog facility enum map
#define DEFAULT_ALERT_SYSLOG_FACILITY_STR
#define SCLogWarning(...)
Macro used to log WARNING messages.
void SyslogInitialize(void)
bool SCRegisterEveFileType(SCEveFileType *plugin)
Register an Eve file type.
SCEnumCharMap * SCSyslogGetLogLevelMap(void)
returns the syslog facility enum map
int SCMapEnumNameToValue(const char *enum_name, SCEnumCharMap *table)
Maps a string name to an enum value from the supplied table. Please specify the last element of any m...
void(* Deinit)(void *init_data)
Final call to deinitialize this filetype.
#define SCLogError(...)
Macro used to log ERROR messages.
int(* Init)(const ConfNode *conf, const bool threaded, void **init_data)
Function to initialize this filetype.
#define SCLogNotice(...)
Macro used to log NOTICE messages.
#define openlog(__ident, __option, __facility)
Structure used to define an EVE output file type plugin.
const char * ConfNodeLookupChildValue(const ConfNode *node, const char *name)
Lookup the value of a child configuration node by name.