Set a default error log when empty

This commit is contained in:
diginc
2016-07-18 21:04:17 -05:00
parent 246599a0ba
commit b6e177de6c

View File

@@ -1,5 +1,8 @@
<?php
$ERRORLOG = getenv('PHP_ERROR_LOG');
if (empty($ERRORLOG)) {
$ERRORLOG = '/var/log/lighttpd/error.log'
}
function pi_log($message) {
error_log(date('Y-m-d H:i:s') . ': ' . $message . "\n", 3, $GLOBALS['ERRORLOG']);