From 7e6268df8c46e50db69d45c5ea5c4d2b2fa380f9 Mon Sep 17 00:00:00 2001 From: JT Smith Date: Thu, 27 Apr 2006 22:16:13 +0000 Subject: [PATCH] better debugging --- lib/WebGUI/Session/ErrorHandler.pm | 11 ++++++++--- sbin/upgrade.pl | 2 -- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/lib/WebGUI/Session/ErrorHandler.pm b/lib/WebGUI/Session/ErrorHandler.pm index ea3b0d14c..38d6a7f12 100644 --- a/lib/WebGUI/Session/ErrorHandler.pm +++ b/lib/WebGUI/Session/ErrorHandler.pm @@ -17,8 +17,8 @@ package WebGUI::Session::ErrorHandler; use strict; use Log::Log4perl; -use Data::Dumper; use Apache2::RequestUtil; +use JSON; =head1 NAME @@ -397,14 +397,19 @@ sub showDebug { my $text = $self->session->stow->get('debug_error'); $text =~ s/\n/\
\n/g; my $output = '
'.$text."
\n"; - $text = $self->session->form->paramsHashRef(); - $output .= '
Form Variables:'.Dumper($text)."
\n" if(scalar(keys %{$text})); $text = $self->session->stow->get('debug_warn'); $text =~ s/\n/\
\n/g; $output .= '
'.$text."
\n"; $text = $self->session->stow->get('debug_info'); $text =~ s/\n/\
\n/g; $output .= '
'.$text."
\n"; + $text = JSON::objToJson($self->session->form->paramsHashRef(), {pretty=>1, indent=>4}); + $text =~ s/&/&/xsg; + $text =~ s/>/>/xsg; + $text =~ s/\n/g; + $text =~ s/ /    /g; + $output .= '
'.$text."
\n"; $text = $self->session->stow->get('debug_debug'); $text =~ s/\n/\
\n/g; $output .= '
'.$text."
\n"; diff --git a/sbin/upgrade.pl b/sbin/upgrade.pl index b3be6caaa..81a28d43c 100644 --- a/sbin/upgrade.pl +++ b/sbin/upgrade.pl @@ -247,8 +247,6 @@ foreach my $filename (keys %config) { my $dumpcmd = $config{$filename}{mysqlDump} || $mysqldump; my $backupTo = $config{$filename}{backupPath} || $backupDir; mkdir($backupTo); - print ("sql:".$upgrade{$config{$filename}{version}}{sql}."\n"); - print ("pl:".$upgrade{$config{$filename}{version}}{pl}."\n"); while ($upgrade{$config{$filename}{version}}{sql} ne "" || $upgrade{$config{$filename}{version}}{pl} ne "") { my $upgrade = $upgrade{$config{$filename}{version}}{from}; unless ($skipBackup) {