Changing object construction and method call to use file_put_contents.

This commit is contained in:
mark_story 2010-11-16 21:54:05 -05:00
parent d12c232d8a
commit d89581dcca

View file

@ -67,9 +67,6 @@ class FileLog implements CakeLogInterface {
$filename = $this->_path . $type . '.log';
}
$output = date('Y-m-d H:i:s') . ' ' . ucfirst($type) . ': ' . $message . "\n";
$log = new SplFileObject($filename, 'a+');
if ($log->isWritable()) {
return $log->fwrite($output);
}
return file_put_contents($filename, $output, FILE_APPEND);
}
}