diff --git a/config/debug-config.php b/config/debug-config.php index 8f517458..cba7667e 100644 --- a/config/debug-config.php +++ b/config/debug-config.php @@ -1,8 +1,11 @@ dbg["ALL"] set, possibly +* also using $c->dbg_filter on busy servers. */ /** @@ -13,17 +16,19 @@ /** -* If you want to debug you have to set to 1 one of this variable -* and then you can look at the error log of PHP for example : -* $c->dbg["ALL"] = 1; -* and then tail -f /var/log/apache2/error_log (or wherever PHP errors are logged). +* If you want to see debug messages in the PHP error log you can set to 1 one +* or several of these variables (there are many more). +* If you want to see every possible log message then $c->dbg["ALL"] can be set, +* and then individual components can be set to 0 to selectively ignore them. * -* in the code a line like this: -* dbg_error_log( "Login", "blabla %s blalba %s",first_string, second_string ); -* will produce in apache error log and if $c->dbg['Login'] ==1 : "blabla first_string blalba second_string" -* using format rules as for printf and related functions. +* To follow the log, try +* tail -f /var/log/apache2/error_log (or wherever your PHP errors are logged) +* +* To add your own debug logging using a printf syntax, use +* dbg_error_log( 'MyComponent', 'At this point, first is %s and second is %s', $first_string, $second_string ); */ // $c->dbg["ALL"] = 1; +// $c->dbg['i18n'] = 0; // $c->dbg["request"] = 1; // The request headers & content // $c->dbg['response'] = 1; // The response headers & content // $c->dbg["component"] = 1; @@ -43,6 +48,19 @@ // $c->dbg['vevent'] = 1; // $c->dbg['rrule'] = 1; + +/** +* Even on a moderately busy server, turning on debug logging for everyone can +* produce a lot of output in a short time that makes it hard to find the +* relevant lines. Debug filtering limits logging to certain IP addresses or +* usernames. (config values are arrays) +*/ +// $c->dbg_filter["remoteIP"][] = '192.168.1.20'; +// $c->dbg_filter["remoteIP"][] = '192.168.1.21'; +// $c->dbg_filter["authenticatedUser"][] = 'peter'; +// $c->dbg_filter["authenticatedUser"][] = 'john'; + + /** * default is 'davical' used to prefix debugging messages but will only need to change * if you are running multiple DAViCal servers logging into the same place.