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 " 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(
const char *buffer,
int buffer_len,
void *init_data,
void *thread_data)
90 static void SyslogDeInit(
void *init_data)
102 if (file_type == NULL) {
107 file_type->
Init = SyslogInit;
108 file_type->
Deinit = SyslogDeInit;
109 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 *)
#define SCLogWarning(...)
Macro used to log WARNING messages.
void SyslogInitialize(void)
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)
#define SCLogError(...)
Macro used to log ERROR 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.