Resolving the logger in OnCriticalError on demand to avoid issues when
self hosting