} else {
$file = $CFG->root.'qtadmin.log';
}
- file_put_contents($file, "[$time]: $message", FILE_APPEND | LOCK_EX);
+ file_put_contents($file, "[$time]: $message\n", FILE_APPEND | LOCK_EX);
+ chmod($file, 0600);
break;
case 'stderr':
- file_put_contents('php://stderr', "[$time]: $message");
+ file_put_contents('php://stderr', "[$time]: $message\n");
break;
case 'syslog':
syslog($priority, $message);