b.logrythmik

{ independency injection }

New Version of NLog.MongoDB Shipped

Long time, no blog.

I finally had some free time to do a little house-keeping on my NLog.MongoDB project.

Changes:

- Added the ability to use a connection string or an existing connection string name.

- Fixed the serialization issue with exceptions.

Feel free to check it out on GitHub here: https://github.com/Logrythmik/NLog.MongoDB

Also, the project is also now available on Nuget!

https://nuget.org/packages/NLog.MongoDB

NLog.MongoDB - A MongoDB Target for NLog

I've been playing with MongoDB quite a bit lately to wrap my head around it. 

We use NLog at work, and I thought MongoDB would be a great way to store NLog entries so I threw this MongoDB target to connect the two.

To install, place the binaries in your bin, and configure NLog like so: 

<?xml version="1.0" encoding="utf-8" ?>
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
			xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<extensions>
		<add assembly="NLog.MongoDB"/>
	</extensions>

	<targets>
		<target name="Mongo" type="MongoDB" host="localhost" port="27017"/>
	</targets>
	<rules>
		<logger name="*" minLevel="Info" appendTo="Mongo"/>
	</rules>
</nlog>

Fork it on GitHub

or

Get the binaries here:

NLog.MongoDB.Binaries.zip (728.05 kb)

Zipped Source here:

NLog.MongoDB.zip (14.99 mb)