} else if (strcmp(key, "save") == 0) {
if (save_set) {
- SCLogWarning("'save' can only appear once");
+ SCLogError("'save' can only appear once");
return -1;
}
SCLogDebug("save %s", val);
save_set = true;
} else if (strcmp(key, "load") == 0) {
if (load_set) {
- SCLogWarning("'load' can only appear once");
+ SCLogError("'load' can only appear once");
return -1;
}
SCLogDebug("load %s", val);
load_set = true;
} else if (strcmp(key, "state") == 0) {
if (state_set) {
- SCLogWarning("'state' can only appear once");
+ SCLogError("'state' can only appear once");
return -1;
}
SCLogDebug("state %s", val);
state_set = true;
} else if (strcmp(key, "format") == 0) {
if (format_set) {
- SCLogWarning("'format' can only appear once");
+ SCLogError("'format' can only appear once");
return -1;
}
SCLogDebug("format %s", val);
} else if (strcmp(val, "json") == 0) {
*format = DATASET_FORMAT_JSON;
} else {
- SCLogWarning("unknown format %s", val);
+ SCLogError("unknown format %s", val);
return -1;
}
format_set = true;
} else if (strcmp(key, "value_key") == 0) {
if (strlen(val) > value_key_size) {
- SCLogWarning("'key' value too long (limit is %zu)", value_key_size);
+ SCLogError("'key' value too long (limit is %zu)", value_key_size);
return -1;
}
strlcpy(value_key, val, value_key_size);
} else if (strcmp(key, "array_key") == 0) {
if (strlen(val) > array_key_size) {
- SCLogWarning("'key' value too long (limit is %zu)", array_key_size);
+ SCLogError("'key' value too long (limit is %zu)", array_key_size);
return -1;
}
strlcpy(array_key, val, array_key_size);
} else if (strcmp(key, "context_key") == 0) {
if (strlen(val) > enrichment_key_size) {
- SCLogWarning("'key' value too long (limit is %zu)", enrichment_key_size);
+ SCLogError("'key' value too long (limit is %zu)", enrichment_key_size);
return -1;
}
strlcpy(enrichment_key, val, enrichment_key_size);
}
if ((load_set || save_set) && state_set) {
- SCLogWarning("'state' can not be mixed with 'load' and 'save'");
+ SCLogError("'state' can not be mixed with 'load' and 'save'");
return -1;
}