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

log4mongo
128 Stars 63 Forks BSD 3-Clause "New" or "Revised" License 111 Commits 12 Opened issues

Description

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

Installation

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>

<field>
    <!-- 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>
</field>
<field>
    <name value="level"></name>
    <layout type="log4net.Layout.PatternLayout" value="%level"></layout>
</field>
<field>
    <name value="thread"></name>
    <layout type="log4net.Layout.PatternLayout" value="%thread"></layout>
</field>
<field>
    <name value="logger"></name>
    <layout type="log4net.Layout.PatternLayout" value="%logger"></layout>
</field>
<field>
    <name value="message"></name>
    <layout type="log4net.Layout.PatternLayout" value="%message"></layout>
</field>
<field>
    <name value="mycustomproperty"></name>
    <layout type="log4net.Layout.RawPropertyLayout">
        <key value="mycustomproperty"></key>
    </layout>
</field>

License

BSD 3

Credits

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

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.