Skip to content
Permalink
Browse files

ensure that plain CakeLogInterface still works

  • Loading branch information...
rchavik committed May 13, 2012
1 parent 8e8763d commit 595cad84b3225a8aff4ed1bfbd24c9ecbf97d48c
@@ -374,8 +374,12 @@ public static function write($type, $message, $scope = array()) {
$scopes = array();
if ($logger instanceof BaseLog) {
$config = $logger->config();
$types = $config['types'];
$scopes = $config['scopes'];
if (isset($config['types'])) {
$types = $config['types'];
}
if (isset($config['scopes'])) {
$scopes = $config['scopes'];
}
}
if (is_string($scope)) {
$inScope = in_array($scope, $scopes);
@@ -64,6 +64,8 @@ public function testImportingLoggers() {
$this->assertTrue($result);
$this->assertEquals(CakeLog::configured(), array('libtest', 'plugintest'));
CakeLog::write(LOG_INFO, 'TestPluginLog is not a BaseLog descendant');
App::build();
CakePlugin::unload();
}
@@ -17,9 +17,10 @@
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
App::uses('BaseLog', 'Log/Engine');
App::uses('CakeLogInterface', 'Log');
class TestPluginLog extends BaseLog {
class TestPluginLog implements CakeLogInterface
{
public function write($type, $message) {
}

0 comments on commit 595cad8

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