Go to the documentation of this file.
38 #define OUTPUT_NAME "syslog"
44 static int SyslogInit(
ConfNode *conf,
bool threaded,
void **init_data)
47 if (context == NULL) {
52 if (facility_s == NULL) {
59 "Invalid syslog facility: \"%s\","
60 " now using \"%s\" as syslog facility",
66 if (level_s != NULL) {
77 openlog(ident, LOG_PID | LOG_NDELAY, facility);
78 SCLogNotice(
"Syslog: facility %s, level %s, ident %s", facility_s, level_s, ident);
83 static int SyslogWrite(
const char *buffer,
int buffer_len,
void *init_data,
void *thread_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;
int(* Write)(const char *buffer, int buffer_len, void *init_data, void *thread_data)
#define syslog(__pri, __fmt, __param)
int(* Init)(ConfNode *conf, bool threaded, void **init_data)
#define DEFAULT_ALERT_SYSLOG_FACILITY
SCEnumCharMap * SCSyslogGetFacilityMap(void)
returns the syslog facility enum map
#define DEFAULT_ALERT_SYSLOG_FACILITY_STR
bool SCRegisterEveFileType(SCEveFileType *)
void SyslogInitialize(void)
@ SC_ERR_INVALID_ARGUMENT
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...
#define SCLogError(err_code,...)
Macro used to log ERROR messages.
#define FatalError(x,...)
void(* Deinit)(void *init_data)
#define SCLogWarning(err_code,...)
Macro used to log WARNING messages.
#define SCLogNotice(...)
Macro used to log NOTICE messages.
#define openlog(__ident, __option, __facility)
const char * ConfNodeLookupChildValue(const ConfNode *node, const char *name)
Lookup the value of a child configuration node by name.