[open-ils-commits] r18459 - branches/rel_1_6/Open-ILS/src/reporter (miker)
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Oct 25 12:26:05 EDT 2010
Author: miker
Date: 2010-10-25 12:26:02 -0400 (Mon, 25 Oct 2010)
New Revision: 18459
Modified:
branches/rel_1_6/Open-ILS/src/reporter/clark-kent.pl
Log:
Dump some debugging output from clark; may later make this optional, but we usually need it when looking for the cause of problems.
Modified: branches/rel_1_6/Open-ILS/src/reporter/clark-kent.pl
===================================================================
--- branches/rel_1_6/Open-ILS/src/reporter/clark-kent.pl 2010-10-25 16:25:36 UTC (rev 18458)
+++ branches/rel_1_6/Open-ILS/src/reporter/clark-kent.pl 2010-10-25 16:26:02 UTC (rev 18459)
@@ -449,6 +449,7 @@
th { background-color: lightgray; }
td,th { border: solid black 1px; }
* { font-family: sans-serif; font-size: 10px; }
+ .dim { color: lightblue; }
</style>
</head>
<body>
@@ -468,6 +469,24 @@
# add a link to the CSV output
push @links, "<a href='report-data.csv'>CSV Output</a>" if ($r->{csv_format});
+ # debugging output
+ push @links, "<a class='dim' href='report-data.html.debug.html'>Debugging Info</a>";
+
+ my $debug = new FileHandle (">$file.debug.html") or die "Cannot write to '$file.debug.html'";
+ print $debug "<html><head><title>DEBUG: $$r{report}{name}</title></head><body>";
+
+ { no warnings;
+ print $debug '<h1>Generated SQL</h1><pre>' . $r->{resultset}->toSQL() . "</pre><a href='$file'>Back to output index</a><hr/>";
+ print $debug '<h1>Template</h1><pre>' . Dumper( OpenSRF::Utils::JSON->JSON2perl( $r->{report}->{template}->{data} ) ) . "</pre><a href='$file'>Back to output index</a><hr/>";
+ print $debug '<h1>Report Parameter</h1><pre>' . Dumper( OpenSRF::Utils::JSON->JSON2perl( $r->{report}->{data} ) ) . "</pre><a href='$file'>Back to output index</a><hr/>";
+ print $debug '<h1>Report Run Time</h1><pre>' . $r->{resultset}->relative_time . "</pre><a href='$file'>Back to output index</a><hr/>";
+ print $debug '<h1>OpenILS::Reporter::SQLBuilder::ResultSet Object</h1><pre>' . Dumper( $r->{resultset} ) . "</pre><a href='$file'>Back to output index</a>";
+ }
+
+ print $debug '</body></html>';
+
+ $debug->close;
+
print $index join(' -- ', @links);
print $index "<br/><br/><br/><br/></center>";
More information about the open-ils-commits
mailing list