diff options
author | Werner Koch <wk@gnupg.org> | 1998-01-02 21:40:10 +0100 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 1998-01-02 21:40:10 +0100 |
commit | b7bdef0834f9d04f96f69a5323e0ac3e5e1b7bc2 (patch) | |
tree | cb6bae66627f4ea4d0a6b29631223ed2fe78ee8e /util/logger.c | |
parent | Sylvester Version (diff) | |
download | gnupg2-b7bdef0834f9d04f96f69a5323e0ac3e5e1b7bc2.tar.xz gnupg2-b7bdef0834f9d04f96f69a5323e0ac3e5e1b7bc2.zip |
added more stuff
Diffstat (limited to 'util/logger.c')
-rw-r--r-- | util/logger.c | 14 |
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 |