From b7bdef0834f9d04f96f69a5323e0ac3e5e1b7bc2 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Fri, 2 Jan 1998 20:40:10 +0000 Subject: added more stuff --- util/logger.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'util/logger.c') 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 -- cgit v1.2.3