Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 97358b9b

Von Sven Schöling vor fast 14 Jahren hinzugefügt

  • ID 97358b9b35233c732be555c5a261ff5d487ad894
  • Vorgänger 9122bdf7
  • Nachfolger 3e8a8c57

Separates Logging für die Console.

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

Unterschiede anzeigen:

SL/DBConnect.pm
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;
SL/LXDebug.pm
$global_level & REQUEST_TIMER;
}
sub file {
@_ == 2 ? $_[0]->{file} = $_[1] : $_[0]->{file};
}
1;
config/lx_office.conf.default
# 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.
scripts/console
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;

Auch abrufbar als: Unified diff