git.cweiske.de
/
phinde.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add log file support
[phinde.git]
/
src
/
phinde
/
Log.php
diff --git
a/src/phinde/Log.php
b/src/phinde/Log.php
index 2369a2bc86b8dc0f261dfb921b0ccaded38733c8..cc8cf1224e053ea03da334eb156d9e87bfd40c99 100644
(file)
--- a/
src/phinde/Log.php
+++ b/
src/phinde/Log.php
@@
-17,7
+17,16
@@
class Log
public static function log($msg)
{
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";
+ }
}
}
?>
}
}
?>