Skip to content
Snippets Groups Projects
Commit 0699d739 authored by Andreas Gohr's avatar Andreas Gohr
Browse files

optional additional header for dbglog()

darcs-hash:20090228145326-7ad00-014ee0dbaa44197eb50423cfd45f4fd2fbe54f22.gz
parent edcb01e5
No related branches found
No related tags found
No related merge requests found
......@@ -280,12 +280,14 @@ function dbg($msg,$hidden=false){
*
* @author Andreas Gohr <andi@splitbrain.org>
*/
function dbglog($msg){
function dbglog($msg,$header=''){
global $conf;
if(is_object($msg) || is_array($msg)){
$msg = print_r($msg,true);
}
if($header) $msg = "$header\n$msg";
$file = $conf['cachedir'].'/debug.log';
$fh = fopen($file,'a');
if($fh){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment