Wenn man mit Userrechten arbeitet gibt es ständig Konflikte welcher Prozess nun
auf das Logfile zugreifen darf. LXDebug ignoriert das still, aber Log4Perl
stirbt mit einer Fehlermeldung. Ab nu gibt es eine separate Logdatei für die
Konsole, und gut ist.
Conflicts:
SL/DB.pm
scripts/console
require Log::Log4perl;
require DBIx::Log4perl;
- my $filename = $LXDebug::file_name;
+ my $filename = $::lxdebug->file;
my $config = $::lx_office_conf{debug}->{dbix_log4perl_config};
$config =~ s/LXDEBUGFILE/${filename}/g;
$global_level & REQUEST_TIMER;
}
+sub file {
+ @_ == 2 ? $_[0]->{file} = $_[1] : $_[0]->{file};
+}
+
1;
# location of history file for permanent history
history_file = users/console_history
+# location of a separate log file for the console. everything normally written
+# to the lx-office log will be put here if triggered from the console
+log_file = /tmp/lxoffice_console_debug.log
+
[debug]
# Use DBIx::Log4perl for logging DBI calls. The string LXDEBUGFILE
# will be replaced by the file name configured for $::lxdebug.
my $login = shift || $::lx_office_conf{console}{login} || 'demo';
my $history_file = $::lx_office_conf{console}{history_file} || '/tmp/lxoffice_console_history.log'; # fallback if users is not writable
+my $debug_file = $::lx_office_conf{Console}{log_file} || '/tmp/lxoffice_console_debug.log';
my $autorun = $::lx_office_conf{console}{autorun};
# will be configed eventually
package main;
- $::lxdebug = LXDebug->new;
+ $::lxdebug = LXDebug->new(file => $debug_file);
$::locale = Locale->new($::lx_office_conf{system}->{language});
$::cgi = CGI->new qw();
$::form = Form->new;