Azure-Samples / Azure-Samples/azure-batch-samples

How to use ILogger for AppInsights logs with azure batch

Open
#294 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
268
Forks
478
PR merge metrics
No merged PRs in 30d

Description

I have seen the azure batch sample [HERE](https://github.com/Azure-Samples/azure-batch-samples/tree/master/CSharp/ArticleProjects/ApplicationInsights) using appinsights to capture and monitor logs. This uses the TelemetryClient directly to capture the logs. That is well and good.
Below is our case:
We have already configured and are using appinsights in our App services. We are using "Microsoft.Extensions.Logging.ILogger" to do the logging to appinsights. Now, in azure batch also, we would want to use the code that is doing the logging using ILogger. So, the question is, how do we use ILogger instead of TelemetryClient directly to capture logs from the azure batch.

I am talking about the .Net version of it.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.