New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PSR-3 compliance #563

Merged
merged 65 commits into from Dec 14, 2015
Commits
Jump to file or symbol
Failed to load files and symbols.
+1,998 −249
Diff settings

Always

Just for now

View
@@ -305,7 +305,7 @@ public static function init(array $settings = NULL)
$_COOKIE = Kohana::sanitize($_COOKIE);
// Load the logger if one doesn't already exist
if ( ! Kohana::$log instanceof Log)
if ( ! Kohana::$log instanceof Psr\Log\LoggerInterface)
{
Kohana::$log = Log::instance();
}
@@ -134,21 +134,23 @@ public static function _handler(Exception $e)
*
* @uses Kohana_Exception::text
* @param Exception $e
* @param int $level
* @param string $level
* @return void
*/
public static function log(Exception $e, $level = Log::EMERGENCY)
public static function log(Exception $e, $level = \Psr\Log\LogLevel::EMERGENCY)
{
if (is_object(Kohana::$log))
{
// Create a text version of the exception
$error = Kohana_Exception::text($e);
// Add this exception to the log
Kohana::$log->add($level, $error, NULL, array('exception' => $e));
Kohana::$log->log($level, $error, array('exception' => $e));
// Make sure the logs are written
Kohana::$log->write();
if (Kohana::$log instanceof Kohana_Log_Buffer)
{
Kohana::$log->flush();
}
}
}
Oops, something went wrong.
ProTip! Use n and p to navigate between commits in a pull request.