NLog MongoDB Library
Writes NLog messages to MongoDB.
Download
The NLog.Mongo library is available on nuget.org via package name NLog.Mongo.
To install NLog.Mongo, run the following command in the Package Manager Console
Install-Package NLog.Mongo
Configuration Syntax
<extensions>
<add assembly="NLog.Mongo"/>
</extensions>
<targets>
<target xsi:type="Mongo"
name="String"
connectionName="String"
connectionString="String"
collectionName="String"
cappedCollectionSize="Long"
cappedCollectionMaxItems="Long"
includeDefaults="Boolean">
<!-- repeated -->
<field name="String" Layout="Layout" />
<!-- repeated -->
<property name="String" Layout="Layout" />
</target>
</targets>
Parameters
General Options
name - Name of the target.