logging: remove unused print stats callbacks

Remove the ThreadExitPrintStats callback from logging modules
that weren't doing anything with it.
pull/2605/head
Jason Ish 9 years ago committed by Victor Julien
parent 0c3f1e2974
commit 6585ac4a9f

@ -412,14 +412,6 @@ static TmEcode AlertDebugLogThreadDeinit(ThreadVars *t, void *data)
return TM_ECODE_OK;
}
static void AlertDebugLogExitPrintStats(ThreadVars *tv, void *data)
{
AlertDebugLogThread *aft = (AlertDebugLogThread *)data;
if (aft == NULL) {
return;
}
}
static void AlertDebugLogDeInitCtx(OutputCtx *output_ctx)
{
if (output_ctx != NULL) {
@ -490,6 +482,5 @@ void AlertDebugLogRegister(void)
{
OutputRegisterPacketModule(LOGGER_ALERT_DEBUG, MODULE_NAME, "alert-debug",
AlertDebugLogInitCtx, AlertDebugLogLogger, AlertDebugLogCondition,
AlertDebugLogThreadInit, AlertDebugLogThreadDeinit,
AlertDebugLogExitPrintStats);
AlertDebugLogThreadInit, AlertDebugLogThreadDeinit, NULL);
}

@ -69,7 +69,6 @@
TmEcode AlertFastLogThreadInit(ThreadVars *, void *, void **);
TmEcode AlertFastLogThreadDeinit(ThreadVars *, void *);
void AlertFastLogExitPrintStats(ThreadVars *, void *);
void AlertFastLogRegisterTests(void);
static void AlertFastLogDeInitCtx(OutputCtx *);
@ -80,8 +79,7 @@ void AlertFastLogRegister(void)
{
OutputRegisterPacketModule(LOGGER_ALERT_FAST, MODULE_NAME, "fast",
AlertFastLogInitCtx, AlertFastLogger, AlertFastLogCondition,
AlertFastLogThreadInit, AlertFastLogThreadDeinit,
AlertFastLogExitPrintStats);
AlertFastLogThreadInit, AlertFastLogThreadDeinit, NULL);
AlertFastLogRegisterTests();
}
@ -217,16 +215,6 @@ TmEcode AlertFastLogThreadDeinit(ThreadVars *t, void *data)
return TM_ECODE_OK;
}
void AlertFastLogExitPrintStats(ThreadVars *tv, void *data)
{
AlertFastLogThread *aft = (AlertFastLogThread *)data;
if (aft == NULL) {
return;
}
//SCLogInfo("Fast log output wrote %" PRIu64 " alerts", aft->file_ctx->alerts);
}
/**
* \brief Create a new LogFileCtx for "fast" output style.
* \param conf The configuration node for this output.

@ -367,20 +367,6 @@ static TmEcode AlertSyslogDecoderEvent(ThreadVars *tv, const Packet *p, void *da
return TM_ECODE_OK;
}
/**
* \brief Function to print the total alert while closing the engine
*
* \param tv Pointer to the output threadvars
* \param data Pointer to the AlertSyslogThread data
*/
static void AlertSyslogExitPrintStats(ThreadVars *tv, void *data)
{
AlertSyslogThread *ast = (AlertSyslogThread *)data;
if (ast == NULL) {
return;
}
}
static int AlertSyslogCondition(ThreadVars *tv, const Packet *p)
{
return (p->alerts.cnt > 0 ? TRUE : FALSE);
@ -407,7 +393,6 @@ void AlertSyslogRegister (void)
#ifndef OS_WIN32
OutputRegisterPacketModule(LOGGER_ALERT_SYSLOG, MODULE_NAME, "syslog",
AlertSyslogInitCtx, AlertSyslogLogger, AlertSyslogCondition,
AlertSyslogThreadInit, AlertSyslogThreadDeinit,
AlertSyslogExitPrintStats);
AlertSyslogThreadInit, AlertSyslogThreadDeinit, NULL);
#endif /* !OS_WIN32 */
}

@ -58,7 +58,6 @@
TmEcode LogHttpLogThreadInit(ThreadVars *, void *, void **);
TmEcode LogHttpLogThreadDeinit(ThreadVars *, void *);
void LogHttpLogExitPrintStats(ThreadVars *, void *);
static void LogHttpLogDeInitCtx(OutputCtx *);
int LogHttpLogger(ThreadVars *tv, void *thread_data, const Packet *, Flow *f, void *state, void *tx, uint64_t tx_id);
@ -67,7 +66,7 @@ void LogHttpLogRegister (void)
{
OutputRegisterTxModule(LOGGER_HTTP, MODULE_NAME, "http-log",
LogHttpLogInitCtx, ALPROTO_HTTP, LogHttpLogger, LogHttpLogThreadInit,
LogHttpLogThreadDeinit, LogHttpLogExitPrintStats);
LogHttpLogThreadDeinit, NULL);
}
#define LOG_HTTP_MAXN_NODES 64
@ -566,16 +565,6 @@ TmEcode LogHttpLogThreadDeinit(ThreadVars *t, void *data)
return TM_ECODE_OK;
}
void LogHttpLogExitPrintStats(ThreadVars *tv, void *data)
{
LogHttpLogThread *aft = (LogHttpLogThread *)data;
if (aft == NULL) {
return;
}
//SCLogInfo("HTTP logger logged %" PRIu32 " requests", aft->uri_cnt);
}
/** \brief Create a new http log LogFileCtx.
* \param conf Pointer to ConfNode containing this loggers configuration.
* \return NULL if failure, LogFileCtx* to the file_ctx if succesful

@ -55,7 +55,6 @@
TmEcode LogStatsLogThreadInit(ThreadVars *, void *, void **);
TmEcode LogStatsLogThreadDeinit(ThreadVars *, void *);
void LogStatsLogExitPrintStats(ThreadVars *, void *);
static void LogStatsLogDeInitCtx(OutputCtx *);
typedef struct LogStatsFileCtx_ {
@ -206,14 +205,6 @@ TmEcode LogStatsLogThreadDeinit(ThreadVars *t, void *data)
return TM_ECODE_OK;
}
void LogStatsLogExitPrintStats(ThreadVars *tv, void *data)
{
LogStatsLogThread *aft = (LogStatsLogThread *)data;
if (aft == NULL) {
return;
}
}
/** \brief Create a new http log LogFileCtx.
* \param conf Pointer to ConfNode containing this loggers configuration.
* \return NULL if failure, LogFileCtx* to the file_ctx if succesful
@ -296,5 +287,5 @@ void LogStatsLogRegister (void)
{
OutputRegisterStatsModule(LOGGER_STATS, MODULE_NAME, "stats",
LogStatsLogInitCtx, LogStatsLogger, LogStatsLogThreadInit,
LogStatsLogThreadDeinit, LogStatsLogExitPrintStats);
LogStatsLogThreadDeinit, NULL);
}

@ -55,7 +55,6 @@
TmEcode LogTcpDataLogThreadInit(ThreadVars *, void *, void **);
TmEcode LogTcpDataLogThreadDeinit(ThreadVars *, void *);
void LogTcpDataLogExitPrintStats(ThreadVars *, void *);
static void LogTcpDataLogDeInitCtx(OutputCtx *);
int LogTcpDataLogger(ThreadVars *tv, void *thread_data, const Flow *f, const uint8_t *data, uint32_t data_len, uint64_t tx_id, uint8_t flags);
@ -63,12 +62,10 @@ int LogTcpDataLogger(ThreadVars *tv, void *thread_data, const Flow *f, const uin
void LogTcpDataLogRegister (void) {
OutputRegisterStreamingModule(LOGGER_TCP_DATA, MODULE_NAME, "tcp-data",
LogTcpDataLogInitCtx, LogTcpDataLogger, STREAMING_TCP_DATA,
LogTcpDataLogThreadInit, LogTcpDataLogThreadDeinit,
LogTcpDataLogExitPrintStats);
LogTcpDataLogThreadInit, LogTcpDataLogThreadDeinit, NULL);
OutputRegisterStreamingModule(LOGGER_TCP_DATA, MODULE_NAME, "http-body-data",
LogTcpDataLogInitCtx, LogTcpDataLogger, STREAMING_HTTP_BODIES,
LogTcpDataLogThreadInit, LogTcpDataLogThreadDeinit,
LogTcpDataLogExitPrintStats);
LogTcpDataLogThreadInit, LogTcpDataLogThreadDeinit, NULL);
}
typedef struct LogTcpDataFileCtx_ {
@ -224,13 +221,6 @@ TmEcode LogTcpDataLogThreadDeinit(ThreadVars *t, void *data)
return TM_ECODE_OK;
}
void LogTcpDataLogExitPrintStats(ThreadVars *tv, void *data) {
LogTcpDataLogThread *aft = (LogTcpDataLogThread *)data;
if (aft == NULL) {
return;
}
}
/** \brief Create a new http log LogFileCtx.
* \param conf Pointer to ConfNode containing this loggers configuration.
* \return NULL if failure, LogFileCtx* to the file_ctx if succesful

Loading…
Cancel
Save