{
OutputJsonCtx *json_ctx = SCCalloc(1, sizeof(OutputJsonCtx));;
+ /* First lookup a sensor-name value in this outputs configuration
+ * node (deprecated). If that fails, lookup the global one. */
const char *sensor_name = ConfNodeLookupChildValue(conf, "sensor-name");
+ if (sensor_name != NULL) {
+ SCLogWarning(SC_ERR_DEPRECATED_CONF,
+ "Found deprecated eve-log setting \"sensor-name\". "
+ "Please set sensor-name globally.");
+ }
+ else {
+ ConfGet("sensor-name", (char **)&sensor_name);
+ }
if (unlikely(json_ctx == NULL)) {
SCLogDebug("AlertJsonInitCtx: Could not create new LogFileCtx");
CASE_CODE (SC_ERR_INVALID_RULE_ARGUMENT);
CASE_CODE (SC_ERR_STATS_LOG_NEGATED);
CASE_CODE (SC_ERR_JSON_STATS_LOG_NEGATED);
+ CASE_CODE (SC_ERR_DEPRECATED_CONF);
}
return "UNKNOWN_ERROR";
SC_ERR_MT_NO_MAPPING,
SC_ERR_STATS_LOG_NEGATED, /** When totals and threads are both NO in yaml **/
SC_ERR_JSON_STATS_LOG_NEGATED, /** When totals and threads are both NO in yaml **/
+ SC_ERR_DEPRECATED_CONF, /**< Deprecated configuration parameter. */
} SCError;
const char *SCErrorToString(SCError);