What is the safest (least dependencies) to log startup in a Blazor app on Azure

David Thielen 2,796 Reputation points

Hi all;

When my Blazor app first starts, before the ILogger system is initialized (or fails initialization), I want to be able to log four things:

  1. The very first line in main() - so I know the app started.
  2. About to call builder.Build()
  3. If there was a problem instantiating the first iLogger instance
  4. The catch for main() to log the exception.

Once builder.Build() has successfully completed and the first iLogger is instantiated, I then can use the logging system. But if any of that fails, I need logging to somewhere to tell me what failed.

So what system can I use that has as few dependencies as possible? And again, without ILogger as this is to log issues that occur before or during the creation of the first logger object.

thanks - dave

A set of technologies in the .NET Framework for building web applications and XML web services.
4,385 questions
A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
1,496 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,362 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Bruce (SqlWork.com) 61,266 Reputation points