From d6fc6e874f2271b1a28e81d35944a22c8cb95879 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Thu, 25 Jun 2015 17:32:16 +0200 Subject: [PATCH] log: reorganize SCLogOPIfaceCtx to make it more efficient --- src/util-debug.c | 4 ++++ src/util-debug.h | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/util-debug.c b/src/util-debug.c index 7a78987dda..7e9726bbb5 100644 --- a/src/util-debug.c +++ b/src/util-debug.c @@ -652,6 +652,10 @@ static inline SCLogOPIfaceCtx *SCLogInitConsoleOPIface(const char *log_format, } iface_ctx->log_level = tmp_log_level; + if (isatty(fileno(stdout))) { + + } + return iface_ctx; } diff --git a/src/util-debug.h b/src/util-debug.h index e5b4d70550..5b0dd008ea 100644 --- a/src/util-debug.h +++ b/src/util-debug.h @@ -120,12 +120,12 @@ typedef struct SCLogOPIfaceCtx_ { /* the facility code if the interface is SC_LOG_IFACE_SYSLOG */ int facility; - /* override for the global_log_format(currently not used) */ - const char *log_format; - /* override for the global_log_level */ SCLogLevel log_level; + /* override for the global_log_format(currently not used) */ + const char *log_format; + struct SCLogOPIfaceCtx_ *next; } SCLogOPIfaceCtx;