本文整理汇总了PHP中SS_Log::clear_writers方法的典型用法代码示例。如果您正苦于以下问题:PHP SS_Log::clear_writers方法的具体用法?PHP SS_Log::clear_writers怎么用?PHP SS_Log::clear_writers使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SS_Log
的用法示例。
在下文中一共展示了SS_Log::clear_writers方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setUp
function setUp()
{
parent::setUp();
SS_Log::clear_writers();
// this test will break if existing writers are available!
$this->testEmailWriter = new SS_LogEmailWriter('sean@silverstripe.com');
$this->testFileWriter = new SS_LogFileWriter('../test.log');
SS_Log::add_writer($this->testEmailWriter, SS_Log::ERR);
SS_Log::add_writer($this->testFileWriter, SS_Log::WARN);
}
示例2: tearDown
public function tearDown()
{
parent::tearDown();
SS_Log::clear_writers();
}
示例3: array
<?php
/**
* CMS Requirements
*/
Config::inst()->update('LeftAndMain', 'extra_requirements_javascript', array(basename(__DIR__) . '/javascript/actions.js' => array()));
/**********************************/
/* Logging Information and Errors */
/**********************************/
// Clear any default writers
SS_Log::clear_writers();
// Logging notices & information
SS_Log::add_writer(new SS_LogFileWriter('../assets/' . basename(__DIR__) . '/logs/info.log'), SS_Log::NOTICE, '=');
// Logging warnings & errors
SS_Log::add_writer(new SS_LogFileWriter('../assets/' . basename(__DIR__) . '/logs/error.log'), SS_Log::WARN, '<=');