by log4mongo

log4mongo /log4mongo-net

log4net appender to MongoDB database.

128 Stars 62 Forks Last release: Not found BSD 3-Clause "New" or "Revised" License 111 Commits 8 Releases

Available items

No Items, yet!

The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:

MongoDB appender for log4net

The title says it all. Check Log4Net site or MongoDB site if you need more info.

This is the official .NET implementation for the log4mongo project

To get started, check out @sammleach blog post: .NET Logging with log4mongo-net


Get it on NuGet, or download sources and run build.cmd to build

Appender configuration sample


Maximum size of newly created collection. Optional, Defaults to creating uncapped collections
<newcollectionmaxsize value="65536"></newcollectionmaxsize>
<newcollectionmaxdocs value="5000"></newcollectionmaxdocs>

    <!-- Note: this needs to be "timestamp" and NOT "Timestamp"  for the TTL index to work -->
    <name value="timestamp"></name>
    <layout type="log4net.Layout.RawTimeStampLayout"></layout>
    <name value="level"></name>
    <layout type="log4net.Layout.PatternLayout" value="%level"></layout>
    <name value="thread"></name>
    <layout type="log4net.Layout.PatternLayout" value="%thread"></layout>
    <name value="logger"></name>
    <layout type="log4net.Layout.PatternLayout" value="%logger"></layout>
    <name value="message"></name>
    <layout type="log4net.Layout.PatternLayout" value="%message"></layout>
    <name value="mycustomproperty"></name>
    <layout type="log4net.Layout.RawPropertyLayout">
        <key value="mycustomproperty"></key>




Thanks to JetBrains for providing us licenses for its excellent tool ReSharper


We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.