Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/Q42/Q42.Logging.ApplicationInsights

Log to ApplicationInsights using the default ILogger
https://github.com/Q42/Q42.Logging.ApplicationInsights

application-insights applicationinsights c-sharp csharp

Last synced: 3 months ago
JSON representation

Log to ApplicationInsights using the default ILogger

Awesome Lists containing this project

README

        

Q42.Logging.ApplicationInsights
=========

Small library that will send logs to Application Insights when using the default ASP.Net Core 1.0 logging.

Available on [NuGet](https://www.nuget.org/packages/Q42.Logging.ApplicationInsights/)

Usage:
Make sure you've set up ApplicationInsights in your application:

Startup.cs / ConfigureServices:
`services.AddApplicationInsightsTelemetry(Configuration);`

Add this package to your project.json and use it:
Startup.cs / Configure:
`loggerFactory.AddApplicationInsights(app.ApplicationServices.GetRequiredService(), LogLevel.Warning);`

### Contributions
Contributions are welcome, just send a PR!

### Credits
This project is based on:
https://github.com/alexvaluyskiy/BookPortal/tree/master/src/BookPortal.Core.Logging