dolittle / Home

Dolittle is a platform designed to build Line of Business applications without sacrificing architectural quality, code quality or scalability.
http://www.dolittle.io
MIT License
27 stars 5 forks source link

Exceptions during logging not showing up #84

Closed joelhoisko closed 3 years ago

joelhoisko commented 4 years ago

Steps to reproduce:

  1. Set log level to "Trace" in appsettings.Development.json in the runtime (I'm using the EventHorizonTest)
  2. Run the runtime and connect the VSCode debugger to it.
  3. Run the head.
  4. Check the VSCode debugger console for tons of System.FormatExceptions.

image

So when an exception happens inside the logger the original message is lost and there is no notification about the logger having failed. This only happens when using the trace logger.

One of these exceptions got fixed by this PR but we need to do something more robust for the future, like tracking failed loggers and to have an option to turn on log messages for when a logger fails.

┆Issue is synchronized with this Asana task

joelhoisko commented 4 years ago

Seems like the exceptions got fixed with: https://github.com/dolittle-runtime/DotNET.SDK/pull/290 https://github.com/dolittle-interaction/AspNetCore/pull/87 https://github.com/dolittle-runtime/Runtime/pull/418

We still don't have a system for logging exceptions within the logger itself but our logging should be better now.