]> git.donarmstrong.com Git - infobot.git/commitdiff
better logging from dondelelcaro
authortimriker <timriker@c11ca15a-4712-0410-83d8-924469b57eb5>
Wed, 12 Mar 2014 22:28:33 +0000 (22:28 +0000)
committertimriker <timriker@c11ca15a-4712-0410-83d8-924469b57eb5>
Wed, 12 Mar 2014 22:28:33 +0000 (22:28 +0000)
git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk@1943 c11ca15a-4712-0410-83d8-924469b57eb5

scripts/irclog2html.pl
src/logger.pl

index b19a1dbd5916887e11466dea00d9448e022db0b0..41bfa17a0de5c5ba627063a294d490aeff8a7408 100755 (executable)
@@ -68,6 +68,24 @@ sub header {
 </head>
 <body text="#000000" bgcolor="#ffffff">
 <h1>IRC log for $channel on $date</h1>
+<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
+<!-- Default -->
+<ins class="adsbygoogle"
+     style="display:inline-block;width:728px;height:90px"
+     data-ad-client="ca-pub-1563266826402652"
+     data-ad-slot="5026919875"></ins>
+<script>
+(adsbygoogle = window.adsbygoogle || []).push({});
+</script>
+<form action="http://www.google.com" id="cse-search-box">
+  <div>
+    <input type="hidden" name="cx" value="partner-pub-1563266826402652:3301963896" />
+    <input type="hidden" name="ie" value="UTF-8" />
+    <input type="text" name="q" size="55" />
+    <input type="submit" name="sa" value="Search" />
+  </div>
+</form>
+<script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse-search-box&amp;lang=en"></script>
 };
 
     if ( $STYLE =~ /table/ ) {
index 3ad021abcbd4953a473ab38051d46151c5d876ef..6220dcd623b2f0b1c57ab384f9789c50081e58e4 100644 (file)
@@ -112,7 +112,7 @@ sub openLog {
 
     if ( &IsParam('logType') and $param{'logType'} =~ /DAILY/i ) {
         my ( $day, $month, $year ) = ( gmtime time() )[ 3, 4, 5 ];
-       my $logDir = $file{log} . sprintf('%04d', $year + 1900);
+        my $logDir = $file{log} . sprintf('%04d', $year + 1900);
         unless(-d $logDir) {
             &status("openLog: making $logDir.");
             mkdir $logDir, 0755 or &status("Cannot mkdir $logDir");;
@@ -178,12 +178,16 @@ sub processLog {
 
 sub DEBUG {
     return unless ( &IsParam('DEBUG') );
+    my (undef,undef,$line,$subroutine,undef) = caller(1);
 
-    &status("${b_green}!DEBUG!$ob $_[0]");
+    &status("${b_green}!DEBUG!$ob ".$subroutine.'['.$line."] $_[0]");
 }
 
 sub ERROR {
-    &status("${b_red}!ERROR!$ob $_[0]");
+    return unless ( &IsParam('DEBUG') );
+    my (undef,undef,$line,$subroutine,undef) = caller(1);
+
+    &status("${b_red}!ERROR!$ob ".$subroutine.'['.$line."] $_[0]");
 }
 
 sub WARN {
@@ -191,15 +195,21 @@ sub WARN {
 
     return if ( $_[0] =~ /^PERL: Subroutine \S+ redefined at/ );
 
-    &status("${b_yellow}!WARN!$ob $_[0]");
+    my ($package,$filename,$line,$subroutine,undef) = caller(1);
+
+    &status("${b_yellow}!WARN!$ob ".$subroutine.'['.$line."] $_[0]");
 }
 
 sub FIXME {
-    &status("${b_cyan}!FIXME!$ob $_[0]");
+    my ($package,$filename,$line,$subroutine,undef) = caller(1);
+
+    &status("${b_cyan}!FIXME!$ob ".$subroutine.'['.$line."] $_[0]");
 }
 
 sub TODO {
-    &status("${b_cyan}!TODO!$ob $_[0]");
+    my ($package,$filename,$line,$subroutine,undef) = caller(1);
+
+    &status("${b_cyan}!TODO!$ob ".$subroutine.'['.$line."] $_[0]");
 }
 
 sub VERB {