Skip to content

MauiApplicationInsights questions #440

Closed Answered by VladislavAntonyuk
vovanb asked this question in Q&A
Discussion options

You must be logged in to vote
  1. It's a good question about how Application Insights works when a device is offline. As far as I know, it collects logs and you can force it to send logs when a device connects to the internet. The alternative to Microsoft Logger, you can use Serilog, which has a method Flush. By calling this method it writes log to sinks (ApplicationInsights in your case)
  2. I can access it from the DI. var logger = Application.Current.Handler.MauiContext.Services.GetService<ILogger>(); (https://learn.microsoft.com/en-us/dotnet/maui/fundamentals/dependency-injection?view=net-maui-8.0)

Replies: 1 comment 9 replies

Comment options

You must be logged in to vote
9 replies
@vovanb
Comment options

@VladislavAntonyuk
Comment options

Answer selected by VladislavAntonyuk
@vovanb
Comment options

@vovanb
Comment options

@vovanb
Comment options

@VladislavAntonyuk
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #439 on July 30, 2024 06:07.