log4mongo-net

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

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.