浏览代码

Set debug, error log config in test/bootstrap.php

Ishan Vyas 5 年之前
父节点
当前提交
e95ef66562
共有 1 个文件被更改,包括 15 次插入0 次删除
  1. 15 0
      tests/bootstrap.php

+ 15 - 0
tests/bootstrap.php

@@ -73,6 +73,21 @@ $cache = [
 
 Cake\Cache\Cache::setConfig($cache);
 
+Cake\Log\Log::setConfig('debug', [
+    'className' => 'Cake\Log\Engine\FileLog',
+    'path' => LOGS,
+    'file' => 'debug',
+    'levels' => ['notice', 'info', 'debug'],
+    'url' => env('LOG_DEBUG_URL', null)
+]);
+Cake\Log\Log::setConfig('error', [
+    'className' => 'Cake\Log\Engine\FileLog',
+    'path' => LOGS,
+    'file' => 'error',
+    'levels' => ['warning', 'error', 'critical', 'alert', 'emergency'],
+    'url' => env('LOG_ERROR_URL', null)
+]);
+
 Cake\Core\Plugin::getCollection()->add(new Tools\Plugin());
 
 Cake\Routing\DispatcherFactory::add('Routing');