[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[4200] branches/1.3
- Subject: SF.net SVN: ledger-smb:[4200] branches/1.3
- From: ..hidden..
- Date: Mon, 12 Dec 2011 12:12:13 +0000
Revision: 4200
http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=4200&view=rev
Author: tshvr
Date: 2011-12-12 12:12:13 +0000 (Mon, 12 Dec 2011)
Log Message:
-----------
DBI trace
Modified Paths:
--------------
branches/1.3/LedgerSMB/Sysconfig.pm
branches/1.3/LedgerSMB.pm
branches/1.3/ledgersmb.conf.default
Modified: branches/1.3/LedgerSMB/Sysconfig.pm
===================================================================
--- branches/1.3/LedgerSMB/Sysconfig.pm 2011-12-11 23:32:25 UTC (rev 4199)
+++ branches/1.3/LedgerSMB/Sysconfig.pm 2011-12-12 12:12:13 UTC (rev 4200)
@@ -95,6 +95,7 @@
our $no_db_str = 'database';
our $log_level = 'ERROR';
+our $DBI_TRACE=0;
# available printers
our %printer;
@@ -102,7 +103,7 @@
read_config( 'ledgersmb.conf' => %config ) or die;
# Root variables
for my $var (
- qw(pathsep logging log_level check_max_invoices language auth latex
+ qw(pathsep logging log_level DBI_TRACE check_max_invoices language auth latex
db_autoupdate force_username_case max_post_size decimal_places cookie_name
return_accno no_db_str tempdir cache_templates)
)
@@ -110,7 +111,6 @@
${$var} = $config{''}{$var} if $config{''}{$var};
}
-
%printer = %{ $config{printers} } if $config{printers};
# ENV Paths
Modified: branches/1.3/LedgerSMB.pm
===================================================================
--- branches/1.3/LedgerSMB.pm 2011-12-11 23:32:25 UTC (rev 4199)
+++ branches/1.3/LedgerSMB.pm 2011-12-12 12:12:13 UTC (rev 4200)
@@ -983,7 +983,12 @@
"dbi:Pg:dbname=$dbname", "$creds->{login}", "$creds->{password}", { AutoCommit => 0 }
);
$logger->debug("DBI->connect dbh=$self->{dbh}");
- #my $dbh = $self->{dbh};
+ my $dbi_trace=$LedgerSMB::Sysconfig::DBI_TRACE;
+ if($dbi_trace)
+ {
+ $logger->debug("\$dbi_trace=$dbi_trace");
+ $self->{dbh}->trace(split /=/,$dbi_trace,2);#http://search.cpan.org/~timb/DBI-1.616/DBI.pm#TRACING
+ }
if (($self->{script} eq 'login.pl') && ($self->{action} eq
@@ -991,7 +996,6 @@
if (!$self->{dbh}){
$self->{_auth_error} = $DBI::errstr;
}
-
return;
}
elsif (!$self->{dbh}){
Modified: branches/1.3/ledgersmb.conf.default
===================================================================
--- branches/1.3/ledgersmb.conf.default 2011-12-11 23:32:25 UTC (rev 4199)
+++ branches/1.3/ledgersmb.conf.default 2011-12-12 12:12:13 UTC (rev 4200)
@@ -7,6 +7,8 @@
language :
log_level : ERROR
+#DBI_TRACE : 1=/tmp/dbi.trace
+DBI_TRACE : 0
# For Windows, uncomment the pathsep line:
# pathsep : ;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.