X-Git-Url: https://git.cweiske.de/phinde.git/blobdiff_plain/696fcd7ce4d495e356667019493bf312e2a6e47b..7b5b3205558717de474a2e77b8b3eea768a38f0e:/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"; + } } } ?>