mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
parent
405aacc0fc
commit
6bb29ea03b
2 changed files with 8 additions and 3 deletions
|
@ -285,9 +285,8 @@ class CakeLog {
|
|||
* @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 @@ class CakeLogTest extends CakeTestCase {
|
|||
$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');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue