commit - 1c2d0ae5ded829c27ded4efde73da9eade84696f
commit + 3d74a9c323fa99dbcba47a1c3978ef4984530f92
blob - d387a723600cfeb11fbd61d6a14f531db2af0450
blob + 0ea5986d693cfe63db460d0a33ef5df7a8098132
--- src/ngircd/log.c
+++ src/ngircd/log.c
* Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
* der an ngIRCd beteiligten Autoren finden Sie in der Datei AUTHORS.
*
- * $Id: log.c,v 1.28 2002/03/29 22:55:42 alex Exp $
+ * $Id: log.c,v 1.29 2002/03/29 23:33:42 alex Exp $
*
* log.c: Logging-Funktionen
*/
LOCAL CHAR Error_File[FNAME_LEN];
+LOCAL CHAR Init_Txt[127];
LOCAL VOID Wall_ServerNotice( CHAR *Msg );
GLOBAL VOID Log_Init( VOID )
{
- CHAR txt[127];
- time_t t;
-
#ifdef USE_SYSLOG
/* Syslog initialisieren */
openlog( PACKAGE, LOG_CONS|LOG_PID, LOG_LOCAL5 );
Log( LOG_NOTICE, "%s started.", NGIRCd_Version( ));
/* Informationen uebern den "Operation Mode" */
- strcpy( txt, "" );
+ strcpy( Init_Txt, "" );
#ifdef DEBUG
if( NGIRCd_Debug )
{
- if( txt[0] ) strcat( txt, ", " );
- strcat( txt, "debug-mode" );
+ if( Init_Txt[0] ) strcat( Init_Txt, ", " );
+ strcat( Init_Txt, "debug-mode" );
}
#endif
if( NGIRCd_NoDaemon )
{
- if( txt[0] ) strcat( txt, ", " );
- strcat( txt, "no-daemon-mode" );
+ if( Init_Txt[0] ) strcat( Init_Txt, ", " );
+ strcat( Init_Txt, "no-daemon-mode" );
}
if( NGIRCd_Passive )
{
- if( txt[0] ) strcat( txt, ", " );
- strcat( txt, "passive-mode" );
+ if( Init_Txt[0] ) strcat( Init_Txt, ", " );
+ strcat( Init_Txt, "passive-mode" );
}
#ifdef SNIFFER
if( NGIRCd_Sniffer )
{
- if( txt[0] ) strcat( txt, ", " );
- strcat( txt, "network sniffer" );
+ if( Init_Txt[0] ) strcat( Init_Txt, ", " );
+ strcat( Init_Txt, "network sniffer" );
}
#endif
- if( txt[0] ) Log( LOG_INFO, "Activating: %s.", txt );
+ if( Init_Txt[0] ) Log( LOG_INFO, "Activating: %s.", Init_Txt );
+} /* Log_Init */
+
+GLOBAL VOID Log_InitErrorfile( VOID )
+{
/* "Error-Log" initialisieren: stderr in Datei umlenken. Dort
* landen z.B. alle Ausgaben von assert()-Aufrufen. */
+
+ time_t t;
+
fflush( stderr );
sprintf( Error_File, ERROR_DIR"/"PACKAGE"-%ld.err", (INT32)getpid( ));
if( ! freopen( Error_File, "w", stderr ))
fputs( ctime( &t ), stderr );
fprintf( stderr, "%s started.\n", NGIRCd_Version( ));
- fprintf( stderr, "Activating: %s\n\n", txt[0] ? txt : "-" );
+ fprintf( stderr, "Activating: %s\n\n", Init_Txt[0] ? Init_Txt : "-" );
fflush( stderr );
-} /* Log_Init */
+} /* Log_InitErrfile */
GLOBAL VOID Log_Exit( VOID )
blob - ac96f072e0332929de3fa834f2ea7c6650c51728
blob + a0f6dbb250b1f174e371c6394d63c2b5eef23f77
--- src/ngircd/log.h
+++ src/ngircd/log.h
* Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
* der an ngIRCd beteiligten Autoren finden Sie in der Datei AUTHORS.
*
- * $Id: log.h,v 1.10 2002/03/27 20:53:31 alex Exp $
+ * $Id: log.h,v 1.11 2002/03/29 23:33:42 alex Exp $
*
* log.h: Logging-Funktionen (Header)
*/
GLOBAL VOID Log_Init( VOID );
GLOBAL VOID Log_Exit( VOID );
+GLOBAL VOID Log_InitErrorfile( VOID );
GLOBAL VOID Log( INT Level, CONST CHAR *Format, ... );
GLOBAL VOID Log_Init_Resolver( VOID );