X-Git-Url: https://git.cweiske.de/phinde.git/blobdiff_plain/696fcd7ce4d495e356667019493bf312e2a6e47b..c32d1b6ffe81afb36fdcaebe0254ad191b72bff6:/src/phinde/Log.php diff --git a/src/phinde/Log.php b/src/phinde/Log.php index 2369a2b..cc8cf12 100644 --- a/src/phinde/Log.php +++ b/src/phinde/Log.php @@ -17,7 +17,16 @@ class Log public static function log($msg) { - echo $msg . "\n"; + if (isset($GLOBALS['phinde']['logfile']) + && $GLOBALS['phinde']['logfile'] != '' + ) { + file_put_contents( + $GLOBALS['phinde']['logfile'], + $msg . "\n", FILE_APPEND + ); + } else { + echo $msg . "\n"; + } } } ?>