From d8e671e98d27e9d819f853ae11b80d8e9165e925 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Thu, 14 Jun 2007 12:12:19 +0000 Subject: [PATCH] Debugmodi umgeschrieben auf das viel schoenere shiftingformat. Neuer Debugmodus "DEVEL", der genau das enthaelt was man ueblicherweise zum debuggen braucht, ohne den overhead von ALL. --- SL/LXDebug.pm | 17 +++++++++-------- lx-erp.conf | 2 ++ 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/SL/LXDebug.pm b/SL/LXDebug.pm index 684a1e7e3..6a8ca5af5 100644 --- a/SL/LXDebug.pm +++ b/SL/LXDebug.pm @@ -1,13 +1,14 @@ package LXDebug; -use constant NONE => 0; -use constant INFO => 1; -use constant DEBUG1 => 2; -use constant DEBUG2 => 4; -use constant QUERY => 8; -use constant TRACE => 16; -use constant BACKTRACE_ON_ERROR => 32; -use constant ALL => 63; +use constant NONE => 0; +use constant INFO => 1; +use constant DEBUG1 => 1 << 1; +use constant DEBUG2 => 1 << 2; +use constant QUERY => 1 << 3; +use constant TRACE => 1 << 4; +use constant BACKTRACE_ON_ERROR => 1 << 5; +use constant ALL => (1 << 6) - 1; +use constant DEVEL => INFO | QUERY | TRACE | BACKTRACE_ON_ERROR; use constant FILE_TARGET => 0; use constant STDERR_TARGET => 1; diff --git a/lx-erp.conf b/lx-erp.conf index d44ef2f9c..b8d023099 100644 --- a/lx-erp.conf +++ b/lx-erp.conf @@ -92,6 +92,8 @@ $pg_restore_exe = "pg_restore"; # LXDebug::BACKTRACE_ON_ERROR - Vollständiger Aufrufpfad, wenn $form->error() aufgerufen wird # LXDebug::ALL - alle Debugausgaben # +# LXDebug::DEVEL - wie INFO | QUERY | TRACE | BACKTRACE_ON_ERROR +# # Beipiel: # $LXDebug::global_level = LXDebug::TRACE | LXDebug::QUERY; $LXDebug::global_level = LXDebug::NONE; -- 2.20.1