fixed a bug in SQL::quote
fixed the logging bug
This commit is contained in:
parent
e26b7c9808
commit
9722bad470
3 changed files with 14 additions and 4 deletions
|
|
@ -14,13 +14,14 @@ package WebGUI::ErrorHandler;
|
|||
|
||||
=cut
|
||||
|
||||
|
||||
use strict;
|
||||
use FileHandle;
|
||||
use Log::Log4perl;
|
||||
use strict;
|
||||
use WebGUI::Session;
|
||||
use Apache2::RequestUtil;
|
||||
|
||||
$Log::Log4perl::caller_depth = 1;
|
||||
$Log::Log4perl::caller_depth++;
|
||||
|
||||
=head1 NAME
|
||||
|
||||
|
|
@ -204,7 +205,9 @@ Returns a reference to the logger.
|
|||
=cut
|
||||
|
||||
sub getLogger {
|
||||
Log::Log4perl::init_once($WebGUI::Session::session{config}{webguiRoot}."/etc/log.conf");
|
||||
unless (Log::Log4perl->initialized()) {
|
||||
Log::Log4perl->init( $WebGUI::Session::session{config}{webguiRoot}."/etc/log.conf" );
|
||||
}
|
||||
return Log::Log4perl->get_logger($WebGUI::Session::session{config}{configFile});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -608,7 +608,7 @@ The database handler. Defaults to the WebGUI database handler.
|
|||
|
||||
sub quote {
|
||||
my $value = shift;
|
||||
return "''" unless $value;
|
||||
return "''" unless defined $value;
|
||||
my $dbh = shift || _getDefaultDb();
|
||||
return $dbh->quote($value);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,6 +11,13 @@ use strict;
|
|||
print "\nStarting WebGUI ".$WebGUI::VERSION."\n";
|
||||
|
||||
|
||||
#----------------------------------------
|
||||
# Logger
|
||||
#----------------------------------------
|
||||
use Log::Log4perl;
|
||||
Log::Log4perl->init( $webguiRoot."/etc/log.conf" );
|
||||
|
||||
|
||||
#----------------------------------------
|
||||
# Database connectivity.
|
||||
#----------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue