// clang-format off
/* holds the string-enum mapping for the enums held in the table SCLogLevel */
-SCEnumCharMap sc_log_level_map[ ] = {
- { "Not set", SC_LOG_NOTSET},
+SCEnumCharMap sc_log_level_map[] = {
+ { "Not set", SC_LOG_NOTSET },
{ "None", SC_LOG_NONE },
- { "Emergency", SC_LOG_EMERGENCY },
- { "Alert", SC_LOG_ALERT },
- { "Critical", SC_LOG_CRITICAL },
{ "Error", SC_LOG_ERROR },
{ "Warning", SC_LOG_WARNING },
{ "Notice", SC_LOG_NOTICE },
SCEnumCharMap sc_log_slevel_map[] = {
{ "Not set", SC_LOG_NOTSET },
{ "None", SC_LOG_NONE },
- { "E", SC_LOG_EMERGENCY },
- { "A", SC_LOG_ALERT },
- { "C", SC_LOG_CRITICAL },
{ "E", SC_LOG_ERROR },
{ "W", SC_LOG_WARNING },
{ "i", SC_LOG_NOTICE },
int syslog_log_level = 0;
switch (log_level) {
- case SC_LOG_EMERGENCY:
- syslog_log_level = LOG_EMERG;
- break;
- case SC_LOG_ALERT:
- syslog_log_level = LOG_ALERT;
- break;
- case SC_LOG_CRITICAL:
- syslog_log_level = LOG_CRIT;
- break;
case SC_LOG_ERROR:
syslog_log_level = LOG_ERR;
break;
sc_lid->startup_message = "Test02";
sc_lid->global_log_level = SC_LOG_DEBUG;
sc_lid->op_filter = "boo";
- sc_iface_ctx = SCLogInitOPIfaceCtx("file", "%m - %d", SC_LOG_ALERT,
- logfile);
+ sc_iface_ctx = SCLogInitOPIfaceCtx("file", "%m - %d", SC_LOG_WARNING, logfile);
SCLogAppendOPIfaceCtx(sc_iface_ctx, sc_lid);
sc_iface_ctx = SCLogInitOPIfaceCtx("console", NULL, SC_LOG_ERROR,
NULL);
typedef enum {
SC_LOG_NOTSET = -1,
SC_LOG_NONE = 0,
- SC_LOG_EMERGENCY,
- SC_LOG_ALERT,
- SC_LOG_CRITICAL,
SC_LOG_ERROR,
SC_LOG_WARNING,
SC_LOG_NOTICE,
#define SCLogErrorRaw(file, func, line, ...) \
SCLogErr(SC_LOG_ERROR, (file), (func), (line), _sc_module, __VA_ARGS__)
-/**
- * \brief Macro used to log CRITICAL messages.
- *
- * \retval err_code Error code that has to be logged along with the
- * critical message
- * \retval ... Takes as argument(s), a printf style format message
- */
-#define SCLogCritical(...) \
- SCLogErr(SC_LOG_CRITICAL, __FILE__, __FUNCTION__, __LINE__, _sc_module, __VA_ARGS__)
-/**
- * \brief Macro used to log ALERT messages.
- *
- * \retval err_code Error code that has to be logged along with the
- * alert message
- * \retval ... Takes as argument(s), a printf style format message
- */
-#define SCLogAlert(...) \
- SCLogErr(SC_LOG_ALERT, __FILE__, __FUNCTION__, __LINE__, _sc_module, __VA_ARGS__)
-/**
- * \brief Macro used to log EMERGENCY messages.
- *
- * \retval err_code Error code that has to be logged along with the
- * emergency message
- * \retval ... Takes as argument(s), a printf style format message
- */
-#define SCLogEmerg(...) \
- SCLogErr(SC_LOG_EMERGENCY, __FILE__, __FUNCTION__, __LINE__, _sc_module, __VA_ARGS__)
-
/* Avoid the overhead of using the debugging subsystem, in production mode */
#ifndef DEBUG