summaryrefslogtreecommitdiffstats
path: root/util/logger.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>1998-01-02 21:40:10 +0100
committerWerner Koch <wk@gnupg.org>1998-01-02 21:40:10 +0100
commitb7bdef0834f9d04f96f69a5323e0ac3e5e1b7bc2 (patch)
treecb6bae66627f4ea4d0a6b29631223ed2fe78ee8e /util/logger.c
parentSylvester Version (diff)
downloadgnupg2-b7bdef0834f9d04f96f69a5323e0ac3e5e1b7bc2.tar.xz
gnupg2-b7bdef0834f9d04f96f69a5323e0ac3e5e1b7bc2.zip
added more stuff
Diffstat (limited to 'util/logger.c')
-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