Need help with log4mongo-net?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

129 Stars 64 Forks BSD 3-Clause "New" or "Revised" License 111 Commits 15 Opened issues


log4net appender to MongoDB database.

Services available


Need anything else?

Contributors list

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.