From 5c4f7415295e2588810abfa8044e0b9ffb3c8985 Mon Sep 17 00:00:00 2001 From: Rachman Chavik Date: Wed, 9 May 2012 12:05:06 +0700 Subject: [PATCH] add default logging config in Config/bootstrap.php --- app/Config/bootstrap.php | 14 ++++++++++++++ .../Console/Templates/skel/Config/bootstrap.php | 14 ++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/app/Config/bootstrap.php b/app/Config/bootstrap.php index 287fc9469..4e7723e86 100644 --- a/app/Config/bootstrap.php +++ b/app/Config/bootstrap.php @@ -151,3 +151,17 @@ Configure::write('Dispatcher.filters', array( 'AssetDispatcher', 'CacheDispatcher' )); + +/** + * Configures default file logging options + */ +CakeLog::config('debug', array( + 'engine' => 'FileLog', + 'types' => array('notice', 'info', 'debug'), + 'file' => 'debug', +)); +CakeLog::config('error', array( + 'engine' => 'FileLog', + 'types' => array('error', 'warning'), + 'file' => 'error', +)); diff --git a/lib/Cake/Console/Templates/skel/Config/bootstrap.php b/lib/Cake/Console/Templates/skel/Config/bootstrap.php index 4b1ed7de0..fefb7d47a 100644 --- a/lib/Cake/Console/Templates/skel/Config/bootstrap.php +++ b/lib/Cake/Console/Templates/skel/Config/bootstrap.php @@ -91,3 +91,17 @@ Configure::write('Dispatcher.filters', array( 'AssetDispatcher', 'CacheDispatcher' )); + +/** + * Configures default file logging options + */ +CakeLog::config('debug', array( + 'engine' => 'FileLog', + 'scopes' => array('notice', 'info', 'debug'), + 'file' => 'debug', +)); +CakeLog::config('error', array( + 'engine' => 'FileLog', + 'scopes' => array('error', 'warning'), + 'file' => 'error', +));