コード例 #1
0
<?php

/*
 * This file is part of the symfony package.
 * (c) Fabien Potencier <*****@*****.**>
 * 
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
require_once dirname(__FILE__) . '/../../bootstrap/unit.php';
require_once dirname(__FILE__) . '/../sfContextMock.class.php';
$t = new lime_test(1);
$context = sfContext::getInstance(array());
$dispatcher = new sfEventDispatcher();
$logger = new sfWebDebugLogger($dispatcher);
// ->handlePhpError()
$t->diag('->handlePhpError()');
$error = error_get_last();
$logger->handlePhpError(E_NOTICE, '%', __FILE__, __LINE__);
$t->is_deeply(error_get_last(), $error, '->handlePhpError() works when message has a "%" character');
コード例 #2
0
<?php

// auto-generated by sfDefineEnvironmentConfigHandler
// date: 2009/08/15 10:45:02
sfConfig::add(array('sf_logging_enabled' => true, 'sf_logging_level' => 'debug', 'sf_logging_rotate' => false, 'sf_logging_period' => 7, 'sf_logging_history' => 10, 'sf_logging_purge' => true));
$logger = sfLogger::getInstance();
$logger->setLogLevel(constant('SF_LOG_' . strtoupper(sfConfig::get('sf_logging_level'))));
$log = new sfWebDebugLogger();
$log->initialize(array());
$logger->registerLogger($log);
$log = new sfFileLogger();
$log->initialize(array('file' => '/Users/takizo/Sites/coscupdemo/log/frontend_dev.log'));
$logger->registerLogger($log);