-
Notifications
You must be signed in to change notification settings - Fork 0
Configuration
rgnitz edited this page Aug 11, 2011
·
2 revisions
The mongo-java-logging library is configured entirely in your logging.properties file. The options available are:
-
com.deftlabs.logging.mongo.MongoHandler.databaseName - Changes the database name (default is "log")
-
com.deftlabs.logging.mongo.MongoHandler.mongoUri - The MongoURI representing your server(s). See the MongoDB Connections page for more information
-
com.deftlabs.logging.mongo.MongoHandler.collectionName - Changes the collection name (default is "mongo-java-logging")
The Following is an example logging.properties file that points to a replica set and logs to the console.
handlers=java.util.logging.ConsoleHandler,com.deftlabs.logging.mongo.MongoHandler
com.deftlabs.logging.mongo.MongoHandler.databaseName=testLog
com.deftlabs.logging.mongo.MongoHandler.collectionName=app.appLogs
com.deftlabs.logging.mongo.MongoHandler.mongoUri=mongodb://127.0.0.1:27017,127.0.0.1/?replicaSet=testReplicaSet
Currently, the MonoDB Java Driver also supports:
- maxpoolsize
- waitqueuemultiple
- waitqueuetimeoutms
- connecttimeoutms
- sockettimeoutms
- autoconnectretry
- slaveok
- safe
- w
- wtimeout
- fsync