Skip to content
Permalink
Browse files

changing CakeLog::_autoConfig for better bc

closes #2880
  • Loading branch information...
rchavik committed May 15, 2012
1 parent 405aacc commit 6bb29ea03b3cbc8dcea9ba156f8e2e4f994b86f7
Showing with 8 additions and 3 deletions.
  1. +1 −2 lib/Cake/Log/CakeLog.php
  2. +7 −1 lib/Cake/Test/Case/Log/CakeLogTest.php
@@ -285,9 +285,8 @@ public static function stream($streamName) {
* @return void
*/
protected static function _autoConfig() {
self::$_Collection->load('error', array(
self::$_Collection->load('default', array(
'engine' => 'FileLog',
'types' => array('warning', 'error', 'critical', 'alert', 'emergency'),
'path' => LOGS,
));
}
@@ -126,8 +126,14 @@ public function testAutoConfig() {
$this->assertTrue(file_exists(LOGS . 'error.log'));
$result = CakeLog::configured();
$this->assertEquals(array('error'), $result);
$this->assertEquals(array('default'), $result);
$testMessage = 'custom message';
CakeLog::write('custom', $testMessage);
$content = file_get_contents(LOGS . 'custom.log');
$this->assertContains($testMessage, $content);
unlink(LOGS . 'error.log');
unlink(LOGS . 'custom.log');
}
/**

0 comments on commit 6bb29ea

Please sign in to comment.
You can’t perform that action at this time.