From a2296c25ef36373ebf65fa34fe245948616fac1a Mon Sep 17 00:00:00 2001 From: miker Date: Mon, 25 Oct 2010 16:25:05 +0000 Subject: [PATCH] Dump some debugging output from clark; may later make this optional, but we usually need it when looking for the cause of problems. git-svn-id: svn://svn.open-ils.org/ILS/trunk@18457 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/reporter/clark-kent.pl | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/Open-ILS/src/reporter/clark-kent.pl b/Open-ILS/src/reporter/clark-kent.pl index 196297e345..12f8d569a1 100755 --- a/Open-ILS/src/reporter/clark-kent.pl +++ b/Open-ILS/src/reporter/clark-kent.pl @@ -449,6 +449,7 @@ sub build_html { th { background-color: lightgray; } td,th { border: solid black 1px; } * { font-family: sans-serif; font-size: 10px; } + .dim { color: lightblue; } @@ -469,6 +470,24 @@ sub build_html { # add a link to the CSV output push @links, "CSV Output" if ($r->{csv_format}); + # debugging output + push @links, "Debugging Info"; + + my $debug = new FileHandle (">$file.debug.html") or die "Cannot write to '$file.debug.html'"; + print $debug "DEBUG: $$r{report}{name}"; + + { no warnings; + print $debug '

Generated SQL

' . $r->{resultset}->toSQL() . "
Back to output index
"; + print $debug '

Template

' . Dumper( OpenSRF::Utils::JSON->JSON2perl( $r->{report}->{template}->{data} ) ) . "
Back to output index
"; + print $debug '

Report Parameter

' . Dumper( OpenSRF::Utils::JSON->JSON2perl( $r->{report}->{data} ) ) . "
Back to output index
"; + print $debug '

Report Run Time

' . $r->{resultset}->relative_time . "
Back to output index
"; + print $debug '

OpenILS::Reporter::SQLBuilder::ResultSet Object

' . Dumper( $r->{resultset} ) . "
Back to output index"; + } + + print $debug ''; + + $debug->close; + print $index join(' -- ', @links); print $index "$br4"; -- 2.11.0