mirror of
git://git.gnupg.org/gnupg.git
synced 2025-02-01 16:33:02 +01:00
* logger.c (g10_log_warning, log_set_strict): Add new log_warning logger
command which can be switched between log_info and log_error via log_set_strict.
This commit is contained in:
parent
0bb65a8a11
commit
c5180316a2
@ -1,3 +1,9 @@
|
||||
2002-10-03 David Shaw <dshaw@jabberwocky.com>
|
||||
|
||||
* logger.c (g10_log_warning, log_set_strict): Add new log_warning
|
||||
logger command which can be switched between log_info and
|
||||
log_error via log_set_strict.
|
||||
|
||||
2002-09-24 David Shaw <dshaw@jabberwocky.com>
|
||||
|
||||
* http.c (connect_server): Try all A records for names with
|
||||
|
@ -31,6 +31,7 @@
|
||||
static char pidstring[15];
|
||||
static char *pgm_name;
|
||||
static int errorcount;
|
||||
static int strict;
|
||||
static FILE *logfp;
|
||||
|
||||
/****************
|
||||
@ -107,6 +108,13 @@ log_inc_errorcount()
|
||||
errorcount++;
|
||||
}
|
||||
|
||||
int
|
||||
log_set_strict(int val)
|
||||
{
|
||||
int old=strict;
|
||||
strict=val;
|
||||
return old;
|
||||
}
|
||||
|
||||
void
|
||||
g10_log_print_prefix(const char *text)
|
||||
@ -164,6 +172,28 @@ g10_log_info_f( const char *fname, const char *fmt, ... )
|
||||
#endif /* __riscos__ */
|
||||
}
|
||||
|
||||
void
|
||||
g10_log_warning( const char *fmt, ... )
|
||||
{
|
||||
va_list arg_ptr ;
|
||||
|
||||
if(strict)
|
||||
{
|
||||
errorcount++;
|
||||
g10_log_print_prefix(_("ERROR: "));
|
||||
}
|
||||
else
|
||||
g10_log_print_prefix(_("WARNING: "));
|
||||
|
||||
va_start( arg_ptr, fmt ) ;
|
||||
vfprintf(logfp,fmt,arg_ptr) ;
|
||||
va_end(arg_ptr);
|
||||
#ifdef __riscos__
|
||||
fflush( logfp );
|
||||
#endif /* __riscos__ */
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
g10_log_error( const char *fmt, ... )
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user