When my Blazor app first starts, before the ILogger system is initialized (or fails initialization), I want to be able to log four things:
main()
- so I know the app started.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?
Use System.Diagnostics.Debug.WriteLine()
or Trace
. If those don't work the system is not loading.
h/t to a friend who gave me the suggestion.