[pLog-CVS] plog debug.php,1.1.1.1,1.2
Brought to you by:
jondaley
From: <phu...@us...> - 2004-01-14 20:40:07
|
Update of /cvsroot/plog/plog In directory sc8-pr-cvs1:/tmp/cvs-serv1423 Modified Files: debug.php Log Message: added a global switch to disable debugging output. Index: debug.php =================================================================== RCS file: /cvsroot/plog/plog/debug.php,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** debug.php 24 Oct 2003 13:51:31 -0000 1.1.1.1 --- debug.php 14 Jan 2004 20:40:04 -0000 1.2 *************** *** 7,17 **** * @param $params Whatever you'd like to print */ function _debug( $params ) { ! $info = debug_backtrace(); ! $last = $info[0]; ! print($last["file"].":".$last["line"].":".$params); return true; } ! ?> \ No newline at end of file --- 7,25 ---- * @param $params Whatever you'd like to print */ + + /** + * set this to 'false' to disable all debugging output + */ + define( "DEBUG_ENABLED", false ); + function _debug( $params ) { ! if( DEBUG_ENABLED ) { ! $info = debug_backtrace(); ! $last = $info[0]; ! print($last["file"].":".$last["line"].":".$params); ! } return true; } ! ?> |