This site contains information about libraries for logging to a MongoDB database from a variety of programming languages.
Starting with version 0.7.4, log4mongo releases are now available through a public Maven repository, specifically the Sonatype OSS Repository.
- Added support for uploading to Sonatype OSS Maven repository
- StringBuffer is auto converted to String when logged
- Updated to support MongoDB 2.2.2 and Mongo Java driver 2.10.1
- Full support for setting the write concern
As of June 2012, Jozef is stepping down as a maintainer of log4mongo-net library and Gian Marco Gherardi is becoming new maintainer and project lead.
Gian Marco has done a lot of work in log4net + MongoDB logging area and project will evolve in his hands.
The nearest milestones are update of log4mongo-net dependencies, most up-to-date NuGet support and better customization and control over logged document structure.
I'm wishing all the best to Marco in his new role and looking forward for exciting improvements in log4mongo-net project !
Lately, too many people have been asking, how to extend/modify log4mongo-python (mongo handler for python logging) handler to log custom or contextual information. Do they need to extend the formatter class or somehow modify the handler itself ? As of this release, these questions are no longer relevant. New version 1.1 now contains full support for logging contextual information. You can decorate logging event with additional contextual information very easily. For more information how to do it visit log4mongo pypi or github page.
- New feature - logging of custom context properties (thanks to Chris Edwards)
- Mongo C# driver updated to latest version 184.108.40.20609
- Package name changed to org.log4mongo. If you upgrade to 0.7.0, you will need to update your log4j.properties file entries to use the new package.
- Backslashes are escaped in logged messages
- Tested with MongoDB 1.8.3 and Mongo Java driver 2.5.3 and 2.6.5
Log4mongo for PHP has made it into the latest stable version of log4php. log4php is a PHP port of Log4J, the most popular Java logging framework. It was a long and difficult journey, but it was worth it.
- Moved to 10gen official C# driver
- This release is backwards incompatible
In the next major release of log4mongo-java, the package name will change to org.log4mongo. The previous package was chosen when the project was hosted on Google code.
- Code completely refactored, no changes in api for end users thought
- Code design influenced by log4mongo-java
- Custom pluggable layouts now supported; base layout implementation provided
- Two appenders instead of one, one supports layouts, other one doesn't
10gen have uploaded the recording of Robert's presentation at the MongoSV conference. It's available at http://www.10gen.com/video/mongosv2010/voxify
- Added loggerName to log document
Robert Stewart, one of the project leads for log4mongo, presented on log4mongo at the MongoSV conference in Mountain View, CA, on Friday, December 3rd. He covered libraries (including the entire log4mongo family) and techniques for storing and analyzing application log events in MongoDB.
- Added support for replica sets
- The hostname property now takes a blank space delimited list of hostnames. You should include all hosts that can become master, i.e., not passive or an arbiter.
- The port property can either be a single port number for each host or a blank space delimited list of ports, one for each of the hosts in the hostname property.
- Appender no longer attempts to insert documents if initialization failed. This was preventing servlets from initializing.
- Maven pom.xml now generates source jar and Javadocs (mvn javadoc:javadoc).
- Tested with MongoDB 1.6.3 and 1.7.3 and Mongo Java driver 2.1 and 2.3
- Made BSONification code more easily reusable
- Base code for BSONifying objects was separated out into an abstract BsonAppender class, LoggingEventBsonifier interface and LoggingEventBsonifierImpl class
- Appender now closes connections to MongoDB when the appender is closed
- You can force Log4J to close appenders from your code by calling LogManager.shutdown(). When deploying to a servlet engine, you should do this from your webapp when the context is destroyed.
- Tested with MongoDB 1.6.3 and Mongo Java driver 2.1 and 2.2
- MongoDBAppender now also logs the logger name, which is useful when wrapping the Logger class. Otherwise, the wrapper class appears to be the source of all logging events.
- Updated to MongoDB Java driver 2.1
- Tested with MongoDB 1.6.0
- Updated to Updated to MongoDB driver 0.90.0.1
- Added loggerName to log document
The released binary of log4mongo-java 0.3.2 is not compatible with MongoDB Java driver 2.1 due to a binary incompatible change made to the Java driver. You can work around this problem by compiling your own binary against the 2.1 driver. A new release of log4mongo-java will be available soon.
- Code relicensed under Apache License version 2.0
- MongoDbPatternLayoutAppender added, allowing custom logging with standard Log4J pattern layout, parser and converter infrastructure
- Append operation now logs to error handler instead of throwing an exception when a document cannot be added to MongoDB