output: issue warning if file can't be opened

pull/8304/head
Victor Julien 3 years ago
parent 79c84211d5
commit 806104c09a

@ -689,7 +689,7 @@ static inline SCLogOPIfaceCtx *SCLogInitFileOPIface(const char *file, uint32_t u
iface_ctx->type = type; iface_ctx->type = type;
if ( (iface_ctx->file_d = fopen(file, "a")) == NULL) { if ( (iface_ctx->file_d = fopen(file, "a")) == NULL) {
printf("Error opening file %s\n", file); SCLogWarning("error opening file %s: %s", file, strerror(errno));
goto error; goto error;
} }

Loading…
Cancel
Save