I am trying to handle the LogWriter Enterprise Library 6 exception that has recently appeared after an upgrade from Enterprise Library 4-6.
I either get:
LogWriter is not installed for the static Logger class. Install it by calling the Logger.SetLogWriter method.
OR
LogWriter is already installed.
... depending on the scenario.
The problem is that it throws an InvalidOperationException that seems too general to handle, and that even checking with
if (Logger.Writer == null)
... also gives an exception, since it would be possible to check if the script is installed or not?
c # logging exception-handling enterprise-library-6
user919426
source share