aboutsummaryrefslogtreecommitdiff
path: root/src/phinde
diff options
context:
space:
mode:
Diffstat (limited to 'src/phinde')
-rw-r--r--src/phinde/Log.php11
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";
+ }
}
}
?>