Squashed commit of the following:
commit
c8d172dc28a8157129d8426255d40fa4a3acd645
Author: Russ Combs <rucombs@cisco.com>
Date: Tue Aug 1 08:52:05 2017 -0400
stdlog: support snort 3> log for text alerts
/* a reasonable minimum */
#define MIN_BUF (4* K_BYTES)
+#define STDLOG_FILENO 3
struct TextLog
{
static FILE* TextLog_Open(const char* name)
{
if ( name && !strcasecmp(name, "stdout") )
- return stdout;
+ {
+ FILE* stdlog = fdopen(STDLOG_FILENO, "w");
+ return stdlog ? stdlog : stdout;
+ }
return OpenAlertFile(name);
}