@ -1,4 +1,4 @@
/* Copyright (C) 2014 Open Information Security Foundation
/* Copyright (C) 2014 -2024 Open Information Security Foundation
*
* You can copy , redistribute or modify this Program under the terms of
* the GNU General Public License version 2 as published by the Free
@ -89,17 +89,16 @@ static int LogStatsLogger(ThreadVars *tv, void *thread_data, const StatsTable *s
int days = in_hours / 24 ;
MemBufferWriteString ( aft - > buffer , " ---------------------------------------------- "
" --------------------------------------\n " ) ;
" --------------- --------------------------------------\n " ) ;
MemBufferWriteString ( aft - > buffer , " Date: % " PRId32 " /% " PRId32 " /%04d -- "
" %02d:%02d:%02d (uptime: % " PRId32 " d, %02dh %02dm %02ds) \n " ,
tms - > tm_mon + 1 , tms - > tm_mday , tms - > tm_year + 1900 , tms - > tm_hour ,
tms - > tm_min , tms - > tm_sec , days , hours , min , sec ) ;
MemBufferWriteString ( aft - > buffer , " ---------------------------------------------- "
" -------------------------------------- \n " ) ;
MemBufferWriteString ( aft - > buffer , " %-45s | %-25s | %-s \n " , " Counter " , " TM Name " ,
" Value " ) ;
" ----------------------------------------------------- \n " ) ;
MemBufferWriteString ( aft - > buffer , " %-60s | %-25s | %-s \n " , " Counter " , " TM Name " , " Value " ) ;
MemBufferWriteString ( aft - > buffer , " ---------------------------------------------- "
" --------------------------------------\n " ) ;
" --------------- --------------------------------------\n " ) ;
/* global stats */
uint32_t u = 0 ;
@ -112,7 +111,7 @@ static int LogStatsLogger(ThreadVars *tv, void *thread_data, const StatsTable *s
continue ;
char line [ 256 ] ;
size_t len = snprintf ( line , sizeof ( line ) , " %- 45 s | %-25s | %-" PRIu64 " \n " ,
size_t len = snprintf ( line , sizeof ( line ) , " %- 60 s | %-25s | %-" PRIu64 " \n " ,
st - > stats [ u ] . name , st - > stats [ u ] . tm_name , st - > stats [ u ] . value ) ;
/* since we can have many threads, the buffer might not be big enough.
@ -206,7 +205,7 @@ TmEcode LogStatsLogThreadDeinit(ThreadVars *t, void *data)
/** \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 succes ful
* \ return NULL if failure , LogFileCtx * to the file_ctx if succes s ful
* */
static OutputInitResult LogStatsLogInitCtx ( ConfNode * conf )
{