mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-11-18 08:19:05 +01:00
LSlog : Added dump feature
This commit is contained in:
parent
711f95b446
commit
dc5b3b44d1
1 changed files with 7 additions and 1 deletions
|
@ -436,12 +436,18 @@ function LSdebugDefined() {
|
|||
return 1;
|
||||
}
|
||||
|
||||
function LSlog($msg) {
|
||||
function LSlog($msg,$dump=false) {
|
||||
if ($GLOBALS['LSlog']['enable']) {
|
||||
global $LSlogFile;
|
||||
if (!$LSlogFile) {
|
||||
$LSlogFile=fopen($GLOBALS['LSlog']['filename'],'a');
|
||||
}
|
||||
if ($dump) {
|
||||
$msg=varDump($msg);
|
||||
}
|
||||
else if (is_array($msg)||is_object($msg)) {
|
||||
$msg = print_r($msg,true);
|
||||
}
|
||||
fwrite($LSlogFile,$_SERVER['REQUEST_URI']." : ".$msg."\n");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue