commit - 15d31d31db3fde16806bdfd7603e1497b11f0338
commit + 030fef4a8a62a77f497da10e190bd79fa8d8d77c
blob - 171f1fba3b15176f399d29c6df339a2abc5b5713
blob + 76c0c768120d047ff1a705f2d018311252fc46de
--- src/ngircd/log.c
+++ src/ngircd/log.c
#include "portab.h"
-static char UNUSED id[] = "$Id: log.c,v 1.44.2.1 2004/05/07 11:24:18 alex Exp $";
+static char UNUSED id[] = "$Id: log.c,v 1.44.2.2 2004/05/15 23:51:13 alex Exp $";
#include "imp.h"
#include <assert.h>
if( NGIRCd_NoDaemon )
{
/* auf Konsole ausgeben */
- fprintf( stdout, "[%d] %s\n", Level, msg );
+ fprintf( stdout, "[%d:%d] %s\n", getpid( ), Level, msg );
fflush( stdout );
}
#ifdef SYSLOG
#ifdef SYSLOG
openlog( PACKAGE_NAME, LOG_CONS|LOG_PID, LOG_LOCAL5 );
#endif
+ Log_Resolver( LOG_DEBUG, "Resolver sub-process starting, PID %d.", getpid( ));
} /* Log_Init_Resolver */
GLOBAL VOID
Log_Exit_Resolver( VOID )
{
+ Log_Resolver( LOG_DEBUG, "Resolver sub-process %d done.", getpid( ));
#ifdef SYSLOG
closelog( );
#endif
{
/* Eintrag des Resolver in Logfile(s) schreiben */
-#ifndef SYSLOG
- return;
-#else
-
CHAR msg[MAX_LOG_MSG_LEN];
va_list ap;
assert( Format != NULL );
-
- if( NGIRCd_NoDaemon ) return;
#ifdef DEBUG
if(( Level == LOG_DEBUG ) && ( ! NGIRCd_Debug )) return;
vsnprintf( msg, MAX_LOG_MSG_LEN, Format, ap );
va_end( ap );
- /* ... und ausgeben */
- syslog( Level, msg );
-
+ /* Output */
+ if( NGIRCd_NoDaemon )
+ {
+ /* Output to console */
+ fprintf( stdout, "[%d:%d] %s\n", getpid( ), Level, msg );
+ fflush( stdout );
+ }
+#ifdef SYSLOG
+ else syslog( Level, msg );
#endif
} /* Log_Resolver */