aboutsummaryrefslogtreecommitdiffstats
path: root/util/logger.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--util/logger.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/util/logger.c b/util/logger.c
index 8993ba43d..c32332b48 100644
--- a/util/logger.c
+++ b/util/logger.c
@@ -26,10 +26,10 @@
#include "util.h"
static char pidstring[15];
-
+static int errorcount;
void
-set_log_pid( int pid )
+log_set_pid( int pid )
{
if( pid )
sprintf(pidstring,"[%u]", (unsigned)pid );
@@ -37,6 +37,15 @@ set_log_pid( int pid )
*pidstring = 0;
}
+int
+log_get_errorcount( int clear)
+{
+ int n = errorcount;
+ if( clear )
+ errorcount = 0;
+ return n;
+}
+
/****************
* General interface for printing a line
@@ -90,6 +99,7 @@ log_error( const char *fmt, ... )
va_start( arg_ptr, fmt ) ;
vfprintf(stderr,fmt,arg_ptr) ;
va_end(arg_ptr);
+ errorcount++;
}
void