]> git.donarmstrong.com Git - infobot.git/blobdiff - src/logger.pl
- renamed Factoids/Misc.pl to Factoids/Core.pl
[infobot.git] / src / logger.pl
index ad4efa53a4dd9979548eb96272c387a1af20eb8c..f550962a6041a6b428fdc0543856d2d865ce55a3 100644 (file)
@@ -191,7 +191,7 @@ sub status {
 
     if ($input eq $logold) {
        # allow perl flooding
-       $logrepeat++ unless (/!WARN! PERL: Use of uninitialized/);
+       $logrepeat++ unless ($input =~ /PERL: Use of uninitialized/);
 
        # todo: prevent massive repetitive throttling.
        if ($logrepeat >= 3) {
@@ -222,10 +222,16 @@ sub status {
 
     for ($input) {
        s/\n+$//;
-       s/\n/<NL>/g;
        s/\002|037//g;  # bold,video,underline => remove.
     }
 
+    # does this work?
+    if ($input =~ /\n/) {
+       foreach (split(/\n/, $input)) {
+           &status($_);
+       }
+    }
+
     # pump up the stats.
     $statcount++;
 
@@ -276,9 +282,9 @@ sub status {
 
     if (&IsParam("VERBOSITY")) {
        if ($statcountfix) {
-           printf $_red."!%5d!".$ob." ", $statcount;
+           printf $_red."!%6d!".$ob." ", $statcount;
        } else {
-           printf $_green."[%5d]".$ob." ", $statcount;
+           printf $_green."[%6d]".$ob." ", $statcount;
        }
 
        # three uberstabs to Derek Moeller.
@@ -367,4 +373,12 @@ sub closeSQLDebug {
     &status("Closed SQL Debug file: $param{'SQLDebug'}");
 }
 
+sub SQLDebug {
+    return unless (&IsParam("SQLDebug"));
+
+    return unless (fileno SQLDEBUG);
+
+    print SQLDEBUG $_[0]."\n";
+}
+
 1;