Coder Social home page Coder Social logo

bjn / log4mongo-net Goto Github PK

View Code? Open in Web Editor NEW

This project forked from log4mongo/log4mongo-net

0.0 2.0 0.0 2.13 MB

log4net appender to MongoDB database.

Home Page: http://log4mongo.org

License: BSD 3-Clause "New" or "Revised" License

Shell 0.13% PowerShell 11.97% C# 87.90%

log4mongo-net's Introduction

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

Installation

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

Appender configuration sample

<appender name="MongoDBAppender" type="Log4Mongo.MongoDBAppender, Log4Mongo">
	<!-- 
	MongoDB database connection in the format:
	mongodb://[username:password@]host1[:port1][,host2[:port2],...[,hostN[:portN]]][/[database][?options]]
	See http://www.mongodb.org/display/DOCS/Connections for connectionstring options 
	If no database specified, default to "log4net"
	-->
	<connectionString value="mongodb://localhost" />
	<!-- 
	Name of the collection in database
	Optional, Defaults to "logs"
	-->
	<collectionName value="logs" />
	<field>
		<name value="timestamp" />
		<layout type="log4net.Layout.RawTimeStampLayout" />
	</field>
	<field>
		<name value="level" />
		<layout type="log4net.Layout.PatternLayout" value="%level" />
	</field>
	<field>
		<name value="thread" />
		<layout type="log4net.Layout.PatternLayout" value="%thread" />
	</field>
	<field>
		<name value="logger" />
		<layout type="log4net.Layout.PatternLayout" value="%logger" />
	</field>
	<field>
		<name value="message" />
		<layout type="log4net.Layout.PatternLayout" value="%message" />
	</field>
	<field>
		<name value="mycustomproperty" />
		<layout type="log4net.Layout.RawPropertyLayout">
			<key value="mycustomproperty" />
		</layout>
	</field>
</appender>

License

BSD 3

Credits

Thanks to JetBrains for providing us licenses for it's excellent tool ReSharper

ReSharper

log4mongo-net's People

Contributors

gimmi avatar jsk avatar chrisedwards avatar bjn avatar log4mongo avatar

Watchers

 avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.