}
}
}
+
+ if ((tok == 0) && (pl->mode == LOGMODE_MULTI)) {
+ SCLogError(SC_ERR_INVALID_ARGUMENT,
+ "Invalid filename for multimode. Need at list one %%-sign option");
+ goto error;
+ }
+
if (s) {
if (tok >= MAX_TOKS) {
SCLogError(SC_ERR_INVALID_ARGUMENT,
pl->suffix = "";
- if (filename) {
- if (ParseFilename(pl, filename) != 0)
- exit(EXIT_FAILURE);
- }
-
pl->size_limit = DEFAULT_LIMIT;
if (conf != NULL) {
const char *s_limit = NULL;
compression_str ? compression_str : "none");
}
+ if (filename) {
+ if (ParseFilename(pl, filename) != 0)
+ exit(EXIT_FAILURE);
+ }
+
SCLogInfo("using %s logging", pl->mode == LOGMODE_SGUIL ?
"Sguil compatible" : (pl->mode == LOGMODE_MULTI ? "multi" : "normal"));