Usage in Az Functions
Closed this issue · 2 comments
Hi,
I was curious if you had used this client library in Azure Functions and whether it augments them or replaces the logger that is injected by default? Any chance you have a reference project that could be posted showing the recommended usage in a Function?
Hey @lwalker-kforce ,
First; sorry, I've entirely missed the notification for this ticket.
Azure Functions are natively integrated with Application Insights. The built-in ILogger
can log directly to Azure Monitor/App Insights.
I use the LogAnalytics.Client
library in addition to this, specifically when we want to ship a lot of our custom events and entities to the log analytics workspaces easily. We sometimes need to distinguish between "runtime logging" versus "business application logic logging" - sometimes they're the same, though.
Mostly, I ship logs from Azure Container Instances, Web Apps, Function Apps, background workers, and a few other portions of microservice architectures. The LogAnalytics.Client
library helps a lot to ship consistent and typed events (C# entities), which are then easily queryable in the logs.
I don't see it as something that replace the built-in ILogger
logging capabilities right now.
Thank you for the response @Zimmergren.