From feb16291aa1877818cc00a8ac54d9d68f5ab4559 Mon Sep 17 00:00:00 2001 From: "Christopher R. Hertel" Date: Mon, 3 Aug 1998 03:22:42 +0000 Subject: I have fixed some of the autoconfigure problems. I'm studying the diffs for the rest. I've found that only debug.h seems to be out of sync (i.e., util.c itself appears to be okay). Chris -)----- (This used to be commit b41cdbffb7233f73ac15526f7b5499658256cd82) --- source3/lib/debug.c | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'source3/lib/debug.c') diff --git a/source3/lib/debug.c b/source3/lib/debug.c index 527ba05cd4..e85643f259 100644 --- a/source3/lib/debug.c +++ b/source3/lib/debug.c @@ -167,7 +167,7 @@ void setup_logging( char *pname, BOOL interactive ) stdout_logging = True; dbf = stdout; } -#ifdef SYSLOG +#ifdef WITH_SYSLOG else { char *p = strrchr( pname,'/' ); @@ -278,7 +278,7 @@ static void check_log_size( void ) * This is called by dbghdr() and format_debug_text(). * ************************************************************************** ** */ -#ifdef __STDC__ +#ifdef HAVE_STDARG_H int Debug1( char *format_str, ... ) { #else @@ -292,7 +292,7 @@ va_dcl if( stdout_logging ) { -#ifdef __STDC__ +#ifdef HAVE_STDARG_H va_start( ap, format_str ); #else va_start( ap ); @@ -304,7 +304,7 @@ va_dcl return( 0 ); } -#ifdef SYSLOG +#ifdef WITH_SYSLOG if( !lp_syslog_only() ) #endif { @@ -329,7 +329,7 @@ va_dcl } } -#ifdef SYSLOG +#ifdef WITH_SYSLOG if( syslog_level < lp_syslog() ) { /* map debug levels to syslog() priorities @@ -351,7 +351,7 @@ va_dcl else priority = priority_map[syslog_level]; -#ifdef __STDC__ +#ifdef HAVE_STDARG_H va_start( ap, format_str ); #else va_start( ap ); @@ -365,11 +365,11 @@ va_dcl } #endif -#ifdef SYSLOG +#ifdef WITH_SYSLOG if( !lp_syslog_only() ) #endif { -#ifdef __STDC__ +#ifdef HAVE_STDARG_H va_start( ap, format_str ); #else va_start( ap ); @@ -476,6 +476,10 @@ BOOL dbghdr( int level, char *file, char *func, int line ) /* Set syslog_level. */ syslog_level = level; + /* Don't print a header if we're logging to stdout. */ + if( stdout_logging ) + return( True ); + /* Print it all out at once. */ Debug1( "[%s, %d] %s%s%s(%d)\n", timestring(), level, file, (*file)?":":"", func, line ); @@ -495,7 +499,7 @@ BOOL dbghdr( int level, char *file, char *func, int line ) * * ************************************************************************** ** */ -#ifdef __STDC__ +#ifdef HAVE_STDARG_H BOOL dbgtext( char *format_str, ... ) { va_list ap; -- cgit