A simple .NET structured logging library for modern applications
C# JavaScript ASP Other
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
.gitattributes
.gitignore
LICENSE.txt
configuration.md
readme.md

readme.md

#Pulsus

A simple .NET structured logging library for modern applications, designed from the ground up for scalability, high availability and flexibility.

This library is now officially supported by DataArt.

##Why another logging library? We reviewed and used other logging libraries in the past like log4net, NLog, ELMAH. All of them are just great but we were looking for something to cover some specific needs to simplify our development process and make sure our products and solutions meet defined quality standards. Pulsus is mostly based on NLog which is an awesome library and we tried to maintain some of its concepts so this is not a library you need to learn a lot to use it.

##Ok, show me the code Using the library to push a trace event...

LogManager.EventFactory.Create()
                        .Level(LoggingEventLevel.Trace)
                        .Text("User accessed private zone")
                        .AddTags("security")
                        .Push();

Adding custom data to the event

// creating an anonymous shopping cart object  
var shoppingCart = new {
                        CustomerId = "1234",
                        ItemCount = 1,
                        Total = 105.99
                   };

LogManager.EventFactory.Create()
                        .Level(LoggingEventLevel.Trace)
                        .Text("Shopping Cart Update")
                        .AddData("ShopingCart", shoppingCart)
                        .Push();

##Installation If you're using .NET 3.5 or above:

PM> Install-Package Pulsus

If you're using .NET 4 or above in a ASP.NET app (WebForms, MVC or WebAPI) you can use Pulsus.Web package which will dinamically register the ErrorLogging module in the pipeline without needing to add it on the web.config.

PM> Install-Package Pulsus.Web

##Configuration Please check the Configuration page.