当前位置: 首页>>代码示例>>PHP>>正文


PHP CakeLog::drop方法代码示例

本文整理汇总了PHP中CakeLog::drop方法的典型用法代码示例。如果您正苦于以下问题:PHP CakeLog::drop方法的具体用法?PHP CakeLog::drop怎么用?PHP CakeLog::drop使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CakeLog的用法示例。


在下文中一共展示了CakeLog::drop方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: tearDown

 /**
  * Restores everything back to normal
  *
  * @return void
  **/
 public function tearDown()
 {
     parent::tearDown();
     CakeLog::enable('stderr');
     CakeLog::drop('queuetest');
     Configure::write('SQS', array());
     unset($this->logger);
 }
开发者ID:dilab,项目名称:cakephp-sqs,代码行数:13,代码来源:SimpleQueueTest.php

示例2: tearDown

 /**
  * Restores everything back to normal
  *
  * @return void
  **/
 public function tearDown()
 {
     parent::tearDown();
     GearmanQueue::client(false);
     CakeLog::enable('stderr');
     CakeLog::drop('queuetest');
     Configure::write('Gearman', array());
     unset($this->logger);
 }
开发者ID:lorenzo,项目名称:cakephp-gearman,代码行数:14,代码来源:GearmanQueueTest.php

示例3: tearDown

 /**
  * Restores everything back to normal
  *
  * @return void
  **/
 public function tearDown()
 {
     parent::tearDown();
     Nodes\Environment::setRoot($this->_root);
     GearmanQueue::config(array('servers' => array('127.0.0.1')));
     GearmanQueue::client(false);
     CakeLog::enable('stderr');
     CakeLog::drop('queuetest');
     unset($this->logger);
 }
开发者ID:nodesagency,项目名称:Platform-Common-Plugin,代码行数:15,代码来源:GearmanQueueTest.php

示例4: setUp

 /**
  * setUp
  *
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     App::build(array('Plugin' => array(TESTS . 'test_app' . DS . 'Plugin' . DS), 'View' => array(TESTS . 'test_app' . DS . 'View' . DS)), App::PREPEND);
     if (!isset($_SERVER['REMOTE_ADDR'])) {
         $_SERVER['REMOTE_ADDR'] = '127.0.0.1';
     }
     CakePlugin::unload('Install');
     CakePlugin::load(array('Users'), array('bootstrap' => true));
     CakePlugin::load('Example');
     Configure::write('Acl.database', 'test');
     $Setting = ClassRegistry::init('Settings.Setting');
     $Setting->settingsPath = TESTS . 'test_app' . DS . 'Config' . DS . 'settings.json';
     Configure::drop('settings');
     Configure::config('settings', new CroogoJsonReader(dirname($Setting->settingsPath) . DS));
     CakeLog::drop('stdout');
     CakeLog::drop('stderr');
     $Setting->writeConfiguration();
 }
开发者ID:laiello,项目名称:plankonindia,代码行数:24,代码来源:CroogoControllerTestCase.php

示例5: testSendWithLog

/**
 * testSendWithLog method
 *
 * @return void
 */
	public function testSendWithLog() {
		$path = CAKE . 'Test' . DS . 'test_app' . DS . 'tmp' . DS;
		CakeLog::config('email', array(
			'engine' => 'FileLog',
			'path' => TMP
		));
		CakeLog::drop('default');
		$this->CakeEmail->transport('Debug');
		$this->CakeEmail->to('me@cakephp.org');
		$this->CakeEmail->from('cake@cakephp.org');
		$this->CakeEmail->subject('My title');
		$this->CakeEmail->config(array('log' => 'cake_test_emails'));
		$result = $this->CakeEmail->send("Logging This");

		App::uses('File', 'Utility');
		$File = new File(TMP . 'cake_test_emails.log');
		$log = $File->read();
		$this->assertTrue(strpos($log, $result['headers']) !== false);
		$this->assertTrue(strpos($log, $result['message']) !== false);
		$File->delete();
		CakeLog::drop('email');
	}
开发者ID:rsuarez2012,项目名称:bioasistmr,代码行数:27,代码来源:CakeEmailTest.php

示例6: _useLogger

 /**
  * Used to enable or disable logging stream output to stdout and stderr
  * If you don't wish to see in your stdout or stderr everything that is logged
  * through CakeLog, call this function with first param as false
  *
  * @param boolean $enable whether to enable CakeLog output or not
  * @return void
  */
 protected function _useLogger($enable = true)
 {
     if (!$enable) {
         CakeLog::drop('stdout');
         CakeLog::drop('stderr');
         return;
     }
     CakeLog::config('stdout', array('engine' => 'Console', 'types' => array('notice', 'info'), 'stream' => $this->stdout));
     CakeLog::config('stderr', array('engine' => 'Console', 'types' => array('emergency', 'alert', 'critical', 'error', 'warning', 'debug'), 'stream' => $this->stderr));
 }
开发者ID:4Queen,项目名称:php-buildpack,代码行数:18,代码来源:Shell.php

示例7: testDrop

	/**
	 * explict tests for drop()
	 *
	 * @return void
	 **/
	function testDrop() {
		CakeLog::config('file', array(
			'engine' => 'FileLog',
			'path' => LOGS
		));
		$result = CakeLog::configured();
		$this->assertEqual($result, array('file'));

		CakeLog::drop('file');
		$result = CakeLog::configured();
		$this->assertEqual($result, array());
	}
开发者ID:ralmeida,项目名称:FoundFree.org,代码行数:17,代码来源:cake_log.test.php

示例8: testProtectedUseLogger

 /**
  * Tests that _useLogger works properly
  *
  * @return void
  */
 public function testProtectedUseLogger()
 {
     CakeLog::drop('stdout');
     CakeLog::drop('stderr');
     $this->Shell->useLogger(true);
     $this->assertNotEmpty(CakeLog::stream('stdout'));
     $this->assertNotEmpty(CakeLog::stream('stderr'));
     $this->Shell->useLogger(false);
     $this->assertFalse(CakeLog::stream('stdout'));
     $this->assertFalse(CakeLog::stream('stderr'));
 }
开发者ID:hupla78,项目名称:Nadia,代码行数:16,代码来源:ShellTest.php

示例9: _useLogger

 /**
  * Used to enable or disable logging stream output to stdout and stderr
  * If you don't wish to see in your stdout or stderr everything that is logged
  * through CakeLog, call this function with first param as false
  *
  * @param bool $enable whether to enable CakeLog output or not
  * @return void
  */
 protected function _useLogger($enable = true)
 {
     if (!$enable) {
         CakeLog::drop('stdout');
         CakeLog::drop('stderr');
         return;
     }
     if (!$this->_loggerIsConfigured("stdout")) {
         $this->_configureStdOutLogger();
     }
     if (!$this->_loggerIsConfigured("stderr")) {
         $this->_configureStdErrLogger();
     }
 }
开发者ID:hodrigohamalho,项目名称:cakephp-ex,代码行数:22,代码来源:Shell.php

示例10: testLogPanelConstructCreatingDefaultLogConfiguration

/**
 * test that creating the log panel creates the default file logger if none
 * are configured.  This stops DebugKit from mucking with the default auto-magic log config
 *
 * @return void
 */
	public function testLogPanelConstructCreatingDefaultLogConfiguration() {
		$this->_loadController();

		CakeLog::drop('default');
		CakeLog::drop('debug_kit_log_panel');

		$panel = new LogPanel(array());
		$configured = CakeLog::configured();

		$this->assertTrue(in_array('default', $configured));
		$this->assertTrue(in_array('debug_kit_log_panel', $configured));
	}
开发者ID:neterslandreau,项目名称:tubones,代码行数:18,代码来源:ToolbarComponentTest.php

示例11: testCustomLevelWrites

 /**
  * Test writing log files with custom levels
  *
  * @return void
  */
 public function testCustomLevelWrites()
 {
     $this->_deleteLogs();
     $this->_resetLogConfig();
     CakeLog::levels(array('spam', 'eggs'));
     $testMessage = 'error message';
     CakeLog::write('error', $testMessage);
     CakeLog::defaultLevels();
     $this->assertTrue(file_exists(LOGS . 'error.log'));
     $contents = file_get_contents(LOGS . 'error.log');
     $this->assertContains('Error: ' . $testMessage, $contents);
     CakeLog::config('spam', array('engine' => 'File', 'file' => 'spam.log', 'types' => 'spam'));
     CakeLog::config('eggs', array('engine' => 'File', 'file' => 'eggs.log', 'types' => array('spam', 'eggs')));
     $testMessage = 'spam message';
     CakeLog::write('spam', $testMessage);
     CakeLog::defaultLevels();
     $this->assertTrue(file_exists(LOGS . 'spam.log'));
     $this->assertTrue(file_exists(LOGS . 'eggs.log'));
     $contents = file_get_contents(LOGS . 'spam.log');
     $this->assertContains('Spam: ' . $testMessage, $contents);
     $testMessage = 'egg message';
     CakeLog::write('eggs', $testMessage);
     CakeLog::defaultLevels();
     $contents = file_get_contents(LOGS . 'spam.log');
     $this->assertNotContains('Eggs: ' . $testMessage, $contents);
     $contents = file_get_contents(LOGS . 'eggs.log');
     $this->assertContains('Eggs: ' . $testMessage, $contents);
     CakeLog::drop('spam');
     CakeLog::drop('eggs');
     $this->_deleteLogs();
 }
开发者ID:yuuicchan0912,项目名称:sample1,代码行数:36,代码来源:CakeLogTest.php

示例12: testSendWithLogAndScope

 /**
  * testSendWithLogAndScope method
  *
  * @return void
  */
 public function testSendWithLogAndScope()
 {
     CakeLog::config('email', array('engine' => 'File', 'path' => TMP, 'types' => array('cake_test_emails'), 'scopes' => array('email')));
     CakeLog::drop('default');
     $this->CakeEmail->transport('Debug');
     $this->CakeEmail->to('me@cakephp.org');
     $this->CakeEmail->from('cake@cakephp.org');
     $this->CakeEmail->subject('My title');
     $this->CakeEmail->config(array('log' => array('level' => 'cake_test_emails', 'scope' => 'email')));
     $result = $this->CakeEmail->send("Logging This");
     App::uses('File', 'Utility');
     $File = new File(TMP . 'cake_test_emails.log');
     $log = $File->read();
     $this->assertTrue(strpos($log, $result['headers']) !== FALSE);
     $this->assertTrue(strpos($log, $result['message']) !== FALSE);
     $File->delete();
     CakeLog::drop('email');
 }
开发者ID:mrbadao,项目名称:api-official,代码行数:23,代码来源:CakeEmailTest.php


注:本文中的CakeLog::drop方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。