<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:p="http://www.springframework.org/schema/p"
       xmlns:http="http://cxf.apache.org/transports/http/configuration" xmlns="http://www.springframework.org/schema/beans"
       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
                        http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/schemas/configuration/http-conf.xsd">

	<bean id="dnetLoggerMongoDao" class="eu.dnetlib.common.logging.dao.DnetLoggerMongoDao"
	      p:db-ref="loggingMongoDB"/>

	<bean id="loggingMongoClient" class="com.mongodb.MongoClient">
		<constructor-arg index="0" type="com.mongodb.ServerAddress">
			<bean class="com.mongodb.ServerAddress">
				<constructor-arg index="0" value="${dnet.logger.mongo.host}"/>
				<constructor-arg index="1" value="${dnet.logger.mongo.port}"/>
			</bean>
		</constructor-arg>
	</bean>

	<bean id="loggingMongoDB" factory-bean="loggingMongoClient"
	      factory-method="getDatabase">
		<constructor-arg type="java.lang.String" value="${dnet.logger.mongo.db}"/>
	</bean>

</beans>
