Metrics library for the .NET structured logging framework Serilog http://serilog.net
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
assets
samples/SerilogMetrics.Samples.Console
src/SerilogMetrics ...nor System.Threading Oct 28, 2016
test/SerilogMetrics.Tests
.gitignore Replace packages.config with project.json for listing dependencies Aug 25, 2016
Build.ps1
CHANGES.md
GitVersionConfig.yaml
LICENSE
README.md
SerilogMetrics.sln
appveyor.yml
global.json

README.md

SerilogMetrics Build status NuGet Rager Releases

Serilog combines the best features of traditional and structured diagnostic logging in an easy-to-use package and Serilog.Metrics extends this logging framework with measure capabilities like counters, timers, meters and gauges.

Get started

To quickly get started, add the SerilogMetrics package to your solution using the NuGet Package manager or run the following command in the Package Console Window:

Install-Package SerilogMetrics

The metrics method extensions are extending the ILogger interface of Serilog. So just reference the Serilog namespace and you can invoke the functionality from the logger.

For example;

var logger = new LoggerConfiguration()
                .MinimumLevel.Debug()
                .WriteTo.Trace()
                .CreateLogger();

using (logger.BeginTimedOperation("Time a thread sleep for 2 seconds."))
{
     Thread.Sleep(2000);
}

See the documentation for more details.

Copyright © 2016 Serilog Metrics Contributors - Provided under the Apache License, Version 2.0.