Revision 54d656bd
Von Moritz Bunkus vor fast 14 Jahren hinzugefügt
SL/DB.pm | ||
---|---|---|
13 | 13 |
|
14 | 14 |
my (%_db_registered, %_initial_sql_executed); |
15 | 15 |
|
16 |
sub dbi_connect { |
|
17 |
shift; |
|
18 |
|
|
19 |
return DBI->connect(@_) unless $::lx_office_conf{debug} && $::lx_office_conf{debug}->{dbix_log4perl}; |
|
20 |
|
|
21 |
require Log::Log4perl; |
|
22 |
require DBIx::Log4perl; |
|
23 |
|
|
24 |
my $filename = $LXDebug::file_name; |
|
25 |
my $config = $::lx_office_conf{debug}->{dbix_log4perl_config}; |
|
26 |
$config =~ s/LXDEBUGFILE/${filename}/g; |
|
27 |
|
|
28 |
Log::Log4perl->init(\$config); |
|
29 |
return DBIx::Log4perl->connect(@_); |
|
30 |
} |
|
31 |
|
|
16 | 32 |
sub create { |
17 | 33 |
my $domain = shift || SL::DB->default_domain; |
18 | 34 |
my $type = shift || SL::DB->default_type; |
Auch abrufbar als: Unified diff
Logging von Datenbankzugriffen auch von Rose via Log::Log4perl und DBIx::Log4perl ermöglichen