]> git.donarmstrong.com Git - infobot.git/commitdiff
supressed subroutine redefined warning. Added sql debug support (open/close)
authordms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Sat, 9 Sep 2000 16:24:25 +0000 (16:24 +0000)
committerdms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Sat, 9 Sep 2000 16:24:25 +0000 (16:24 +0000)
git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@79 c11ca15a-4712-0410-83d8-924469b57eb5

src/logger.pl

index 454b36360041025f98af6eaf9cd841e2739f742c..dfb64e01b572a6e22bb1714716e23a8afe97fab2 100644 (file)
@@ -162,6 +162,8 @@ sub ERROR {
 sub WARN {
     return unless (&IsParam("WARN"));
 
+    return if ($_[0] =~ /^PERL: Subroutine \S+ redefined at/);
+
     &status("${b_yellow}!WARN!$ob $_[0]");
 }
 
@@ -312,4 +314,21 @@ sub status {
     print LOG sprintf("%s %s\n", $date, $input);
 }
 
+sub openSQLDebug {
+    if (!open(SQLDEBUG, $param{'SQLDebug'})) {
+       &ERROR("cannot open $param{'SQLDebug'}...");
+       delete $param{'SQLDebug'};
+       return 0;
+    }
+
+    &status("Opened SQL Debug file: $param{'SQLDebug'}");
+    return 1;
+}
+
+sub closeSQLDebug {
+    close SQLDEBUG;
+
+    &status("Closed SQL Debug file: $param{'SQLDebug'}");
+}
+
 1;