diff options
| author | Christian Weiske <cweiske@cweiske.de> | 2016-12-03 22:32:19 +0100 |
|---|---|---|
| committer | Christian Weiske <cweiske@cweiske.de> | 2016-12-03 22:32:19 +0100 |
| commit | 7b5b3205558717de474a2e77b8b3eea768a38f0e (patch) | |
| tree | 00a5224b0f1dd51987fc10b81c1ab1acdd90d881 /src/phinde/Log.php | |
| parent | 6c95d7fe170a54449755a8b571a191a3aaaf954e (diff) | |
| download | phinde-7b5b3205558717de474a2e77b8b3eea768a38f0e.tar.gz phinde-7b5b3205558717de474a2e77b8b3eea768a38f0e.zip | |
add log file supportv0.2.1
Diffstat (limited to 'src/phinde/Log.php')
| -rw-r--r-- | src/phinde/Log.php | 11 |
1 files changed, 10 insertions, 1 deletions
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"; + } } } ?> |
