Projekt

Allgemein

Profil

Herunterladen (593 Bytes) Statistiken
| Zweig: | Markierung: | Revision:
package SL::DBConnect;

use strict;

use DBI;

sub connect {
shift;

return DBI->connect(@_) unless $::lx_office_conf{debug} && $::lx_office_conf{debug}->{dbix_log4perl};

require Log::Log4perl;
require DBIx::Log4perl;

my $filename = $::lxdebug->file;
my $config = $::lx_office_conf{debug}->{dbix_log4perl_config};
$config =~ s/LXDEBUGFILE/${filename}/g;

Log::Log4perl->init(\$config);
return DBIx::Log4perl->connect(@_);
}

sub get_options {
my $self = shift;
my $options = {
pg_enable_utf8 => $::locale->is_utf8,
@_
};

return $options;
}

1;
(19-19/72)