Merge branch '3.6' of github.com:alchemy-fr/Phraseanet into 3.6

This commit is contained in:
Romain Neutron
2012-01-24 16:19:08 +01:00
5 changed files with 9 additions and 13 deletions

View File

@@ -105,11 +105,11 @@ query_logger:
#Name of the file where logs are written
filename: doctrine-query.log
# Define a normal log service for Doctrine
# normal logger logs doctrine queries to the standard output using echo/var_dump
# Notice that normal logger do not have options
# Define a phpecho log service for Doctrine
# phpecho logger logs doctrine queries to the standard output using echo/var_dump
# Notice that phpecho logger do not have options
sql_logger:
type: normal
type: phpecho
#Define cache services
#There are Four deffirent cache type available [array, xcache, apc, memcache]

View File

@@ -23,7 +23,7 @@ use Doctrine\DBAL\Logging\EchoSQLLogger;
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
class Normal extends ServiceAbstract implements ServiceInterface
class Phpecho extends ServiceAbstract implements ServiceInterface
{
@@ -34,7 +34,7 @@ class Normal extends ServiceAbstract implements ServiceInterface
public function getType()
{
return 'normal';
return 'phpecho';
}
public function getScope()

View File

@@ -40,7 +40,7 @@ class Doctrine extends ServiceAbstract implements ServiceInterface
'json', 'yaml', 'normal'
);
protected $loggers = array(
'monolog', 'normal'
'monolog', 'phpecho'
);
protected $entityManager;
protected $cacheServices = array();

View File

@@ -23,7 +23,7 @@ use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag;
class Log extends AbstractBuilder
{
protected static $optionsNotMandatory = array('normal');
protected static $optionsNotMandatory = array('phpecho');
public static function create($name, ParameterBag $configuration, Array $dependencies = array(), $namespace = null)
{

View File

@@ -54,11 +54,7 @@ class LogBuilderTest extends PhraseanetPHPUnitAbstract
public function testCreateNamespace()
{
$configuration = new Symfony\Component\DependencyInjection\ParameterBag\ParameterBag(
array("type" => "normal", "options" => array(
"handler" => "rotate"
, "filename" => "test"
)
)
array("type" => "phpecho", "options" => array())
);
$service = Alchemy\Phrasea\Core\ServiceBuilder\Log::create("test", $configuration, array(), "Doctrine");