The first ever call to Olive.Log.For<T>() caches the LogFactory. Unfortunately, if this is done by framework code before the Web application initialisation has a chance to add ApplicationInsights logging, then all subsequent calls to Olive.Log.For<T>() does not return a Microsoft.Extensions.Logging.ApplicationInsights.ApplicationInsightsLogger.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
https://github.com/Geeksltd/Olive/blob/3ef929b6f6d97e8f5238bdc5127be17db16b0469/Olive/Logging/Log.cs#L75
The first ever call to
Olive.Log.For<T>()
caches the LogFactory. Unfortunately, if this is done by framework code before the Web application initialisation has a chance to add ApplicationInsights logging, then all subsequent calls toOlive.Log.For<T>()
does not return a Microsoft.Extensions.Logging.ApplicationInsights.ApplicationInsightsLogger.Thus no logs are sent to Application Insights.
This is a potential race condition.