[eggheads-patches] PATCH: logall.patch

Peter 'Rattacresh' Backes rtc at rhrk.uni-kl.de
Sat Oct 9 09:11:34 CST 1999


Several putlogs were unnecessarily logging with loglevel LOG_ALL. 
These have been changed to LOG_MISC which is totally sufficient.
In contrast, nightly time stamps were only written to LOG_MISC, but 
they should go to all logfiles.


-- Peter 'Rattacresh' Backes, rtc at rhrk.uni-kl.de

-------------- next part --------------
diff -urN eggdrop1.3.29/doc/UPDATES1.3 eggdrop1.3.29+logall/doc/UPDATES1.3
--- eggdrop1.3.29/doc/UPDATES1.3	Fri Oct  8 22:28:43 1999
+++ eggdrop1.3.29+logall/doc/UPDATES1.3	Fri Oct  8 22:31:11 1999
@@ -4,6 +4,8 @@
 
 1.3.29
 Foundby   Fixedby   What....
+          rtc       some messages were still sent too all logfiles;
+                    only nightly time stamps should go to there.
           dw        kicks weren't being logged
           rtc       added assert debugging feature
 	  Fabian    main() wasn't removing unknown sockets correctly
diff -urN eggdrop1.3.29/src/main.c eggdrop1.3.29+logall/src/main.c
--- eggdrop1.3.29/src/main.c	Fri Oct  8 22:28:43 1999
+++ eggdrop1.3.29+logall/src/main.c	Fri Oct  8 22:27:05 1999
@@ -439,7 +439,7 @@
 	int j;
 
 	s[my_strcpy(s, ctime(&now)) - 1] = 0;
-	putlog(LOG_MISC, "*", "--- %.11s%s", s, s + 20);
+	putlog(LOG_ALL, "*", "--- %.11s%s", s, s + 20);
 	backup_userfile();
 	for (j = 0; j < max_logs; j++) {
 	  if (logs[j].filename != NULL && logs[j].f != NULL) {
@@ -614,7 +614,7 @@
   strcpy(s, ctime(&now));
   s[strlen(s) - 1] = 0;
   strcpy(&s[11], &s[20]);
-  putlog(LOG_ALL, "*", "--- Loading %s (%s)", ver, s);
+  putlog(LOG_MISC, "*", "--- Loading %s (%s)", ver, s);
   chanprog();
   context;
   if (encrypt_pass == 0) {
@@ -624,7 +624,7 @@
   i = 0;
   for (chan = chanset; chan; chan = chan->next)
     i++;
-  putlog(LOG_ALL, "*", "=== %s: %d channels, %d users.",
+  putlog(LOG_MISC, "*", "=== %s: %d channels, %d users.",
 	 botnetnick, i, count_users(userlist));
   cache_miss = 0;
   cache_hit = 0;
diff -urN eggdrop1.3.29/src/mod/server.mod/server.c eggdrop1.3.29+logall/src/mod/server.mod/server.c
--- eggdrop1.3.29/src/mod/server.mod/server.c	Fri Oct  8 22:28:43 1999
+++ eggdrop1.3.29+logall/src/mod/server.mod/server.c	Fri Oct  8 22:28:17 1999
@@ -1440,6 +1440,6 @@
     use_silence = 0;
     check_mode_r = 0;
   }
-  putlog(LOG_ALL, "*", "=== SERVER SUPPORT LOADED");
+  putlog(LOG_MISC, "*", "=== SERVER SUPPORT LOADED");
   return NULL;
 }
diff -urN eggdrop1.3.29/src/net.c eggdrop1.3.29+logall/src/net.c
--- eggdrop1.3.29/src/net.c	Fri Oct  8 22:28:43 1999
+++ eggdrop1.3.29+logall/src/net.c	Fri Oct  8 22:27:37 1999
@@ -423,7 +423,7 @@
 
   if (firewall[0]) {
     /* FIXME: can't do listen port thru firewall yet */
-    putlog(LOG_ALL, "*", "!! Cant open a listen port (you are using a firewall)");
+    putlog(LOG_MISC, "*", "!! Cant open a listen port (you are using a firewall)");
     return -1;
   }
   sock = getsock(SOCK_LISTEN);


More information about the Patches mailing list