[
https://issues.apache.org/jira/browse/LOG4PHP-190?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13457300#comment-13457300
]
Ivan Habunek commented on LOG4PHP-190:
--------------------------------------
Can't help you if you don't tell me which error you get. I tried the code and
it works for me.
> 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