about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAlexander Barton <alex@barton.de>2002-02-19 20:07:13 +0000
committerAlexander Barton <alex@barton.de>2002-02-19 20:07:13 +0000
commitfcb47ae64b8915efdb8ed6f589d04bbc48bf9485 (patch)
tree5de2d8f00348b668f75ecd243cd12beee797195c
parent1fe8355fcf0c79c860a3449bccd0a232363a3739 (diff)
downloadngircd-fcb47ae64b8915efdb8ed6f589d04bbc48bf9485.tar.gz
ngircd-fcb47ae64b8915efdb8ed6f589d04bbc48bf9485.zip
- direkt nach dem Start werden die aktiven "Modes" ins Log geschrieben.
-rw-r--r--src/ngircd/log.c41
1 files changed, 40 insertions, 1 deletions
diff --git a/src/ngircd/log.c b/src/ngircd/log.c
index d6ef555a..d0608cbc 100644
--- a/src/ngircd/log.c
+++ b/src/ngircd/log.c
@@ -9,11 +9,14 @@
  * 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.17 2002/01/11 14:45:37 alex Exp $
+ * $Id: log.c,v 1.18 2002/02/19 20:07:13 alex Exp $
  *
  * log.c: Logging-Funktionen
  *
  * $Log: log.c,v $
+ * Revision 1.18  2002/02/19 20:07:13  alex
+ * - direkt nach dem Start werden die aktiven "Modes" ins Log geschrieben.
+ *
  * Revision 1.17  2002/01/11 14:45:37  alex
  * - Anpassungen an neue Kommandozeilen-Optionen "--debug" und "--nodaemon".
  *
@@ -94,17 +97,53 @@
 
 GLOBAL VOID Log_Init( VOID )
 {
+	CHAR txt[127];
+
 #ifdef USE_SYSLOG
+	/* Syslog initialisieren */
 	openlog( PACKAGE, LOG_CONS|LOG_PID, LOG_LOCAL5 );
 #endif
+
+	/* Hello World! */
 	Log( LOG_NOTICE, "%s started.", NGIRCd_Version( ));
+
+	/* Informationen uebern den "Operation Mode" */
+	strcpy( txt, "" );
+#ifdef DEBUG
+	if( NGIRCd_Debug )
+	{
+		if( txt[0] ) strcat( txt, ", " );
+		strcat( txt, "debug-mode" );
+	}
+#endif
+	if( NGIRCd_NoDaemon )
+	{
+		if( txt[0] ) strcat( txt, ", " );
+		strcat( txt, "no-daemon-mode" );
+	}
+	if( NGIRCd_Passive )
+	{
+		if( txt[0] ) strcat( txt, ", " );
+		strcat( txt, "passive-mode" );
+	}
+#ifdef SNIFFER
+	if( NGIRCd_Sniffer )
+	{
+		if( txt[0] ) strcat( txt, ", " );
+		strcat( txt, "network sniffer" );
+	}
+#endif
+	if( txt[0] ) Log( LOG_INFO, "Activating: %s.", txt );
 } /* Log_Init */
 
 
 GLOBAL VOID Log_Exit( VOID )
 {
+	/* Good Bye! */
 	Log( LOG_NOTICE, PACKAGE" done.");
+	
 #ifdef USE_SYSLOG
+	/* syslog abmelden */
 	closelog( );
 #endif
 } /* Log_Exit */