diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2009-06-21 18:12:22 -0700 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2009-06-21 18:12:43 -0700 |
commit | a80dbea5288713cafe8a7d53f2a2040b461ebcb7 (patch) | |
tree | dfb67cab9f19b7fd896a38457ba244ed5ce50b6e | |
parent | 42ec238847675f5943468fc6fc22b0e0bbf43f1c (diff) | |
download | DotNetOpenAuth-a80dbea5288713cafe8a7d53f2a2040b461ebcb7.zip DotNetOpenAuth-a80dbea5288713cafe8a7d53f2a2040b461ebcb7.tar.gz DotNetOpenAuth-a80dbea5288713cafe8a7d53f2a2040b461ebcb7.tar.bz2 |
Fixed problem where an unexpected version of log4net.dll in the Bin directory would cause DNOA to fail to start.
Logging is quietly disabled in that case now.
-rw-r--r-- | src/DotNetOpenAuth/Loggers/Log4NetLogger.cs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/DotNetOpenAuth/Loggers/Log4NetLogger.cs b/src/DotNetOpenAuth/Loggers/Log4NetLogger.cs index 30d93ae..dd71a05 100644 --- a/src/DotNetOpenAuth/Loggers/Log4NetLogger.cs +++ b/src/DotNetOpenAuth/Loggers/Log4NetLogger.cs @@ -197,7 +197,11 @@ namespace DotNetOpenAuth.Loggers { /// </summary> /// <returns>The created <see cref="ILog"/> instance.</returns> internal static ILog Initialize(string name) { - return IsLog4NetPresent ? CreateLogger(name) : null; + try { + return IsLog4NetPresent ? CreateLogger(name) : null; + } catch (FileLoadException) { // wrong log4net.dll version + return null; + } } /// <summary> |