You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4php-dev@logging.apache.org by "Ivan Habunek (JIRA)" <ji...@apache.org> on 2012/09/17 22:41:07 UTC
[jira] [Updated] (LOG4PHP-190) MongoDB Appender Set Properties
[ https://issues.apache.org/jira/browse/LOG4PHP-190?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ivan Habunek updated LOG4PHP-190:
---------------------------------
Description:
Hello,
I am trying to use the MongoDB Appender and I am getting an error when I try to set the database or collection names. See test case below.
{code}
class MongoDBTest extends \PHPUnit_Framework_TestCase{
public function testInstance()
{
$configuration = array(
'appenders' => array(
'audit_log' => array(
'class' => 'LoggerAppenderMongoDB',
'params' => array(
'host' => "mongodb://localhost",
'databaseName' => "test_audit_log"
),
),
),
'rootLogger' => array(
'appenders' => array('audit_log'),
),
);
\Logger::configure($configuration);
$logger = \Logger::getLogger('audit_log');
$logger->info("not working");
}
}
{code}
was:
Hello,
I am trying to use the MongoDB Appender and I am getting an error when I try to set the database or collection names. See test case below.
class MongoDBTest extends \PHPUnit_Framework_TestCase{
public function testInstance()
{
$configuration = array(
'appenders' => array(
'audit_log' => array(
'class' => 'LoggerAppenderMongoDB',
'params' => array(
'host' => "mongodb://localhost",
'databaseName' => "test_audit_log"
),
),
),
'rootLogger' => array(
'appenders' => array('audit_log'),
),
);
\Logger::configure($configuration);
$logger = \Logger::getLogger('audit_log');
$logger->info("not working");
}
}
> MongoDB Appender Set Properties
> -------------------------------
>
> Key: LOG4PHP-190
> URL: https://issues.apache.org/jira/browse/LOG4PHP-190
> Project: Log4php
> Issue Type: Bug
> Reporter: Dan Cardin
>
> Hello,
> I am trying to use the MongoDB Appender and I am getting an error when I try to set the database or collection names. See test case below.
> {code}
> class MongoDBTest extends \PHPUnit_Framework_TestCase{
>
> public function testInstance()
> {
> $configuration = array(
> 'appenders' => array(
> 'audit_log' => array(
> 'class' => 'LoggerAppenderMongoDB',
> 'params' => array(
> 'host' => "mongodb://localhost",
> 'databaseName' => "test_audit_log"
> ),
> ),
> ),
> 'rootLogger' => array(
> 'appenders' => array('audit_log'),
> ),
> );
>
>
> \Logger::configure($configuration);
> $logger = \Logger::getLogger('audit_log');
> $logger->info("not working");
>
> }
> }
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira