Dan Cardin created LOG4PHP-190:
----------------------------------

             Summary: 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.

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");     
        
    }
}



--
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

Reply via email to