[Monodevelop-patches-list] r2438 - in trunk/MonoDevelop/Core/src/MonoDevelop.Base: . Services

Christian Hergert <chris@mosaix.net> chergert at mono-cvs.ximian.com
Sat Apr 9 04:29:09 EDT 2005


Author: chergert
Date: 2005-04-09 04:29:09 -0400 (Sat, 09 Apr 2005)
New Revision: 2438

Modified:
   trunk/MonoDevelop/Core/src/MonoDevelop.Base/ChangeLog
   trunk/MonoDevelop/Core/src/MonoDevelop.Base/Services/DefaultLoggingService.cs
Log:
* Services/DefaultLoggingService.cs: Fix the log4net error by
checking for the .config before configuring.


Modified: trunk/MonoDevelop/Core/src/MonoDevelop.Base/ChangeLog
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/ChangeLog	2005-04-08 22:54:46 UTC (rev 2437)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/ChangeLog	2005-04-09 08:29:09 UTC (rev 2438)
@@ -1,3 +1,8 @@
+2005-04-09	Christian Hergert	<christian.hergert at gmail.com>
+
+	* Services/DefaultLoggingService.cs: Fix the log4net error by
+	checking for the .config before configuring.
+
 2005-04-08	Christian Hergert	<christian.hergert at gmail.com>
 
 	* Services/DefaultLoggingService.cs: Add missing event firing for Error

Modified: trunk/MonoDevelop/Core/src/MonoDevelop.Base/Services/DefaultLoggingService.cs
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/Services/DefaultLoggingService.cs	2005-04-08 22:54:46 UTC (rev 2437)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/Services/DefaultLoggingService.cs	2005-04-09 08:29:09 UTC (rev 2438)
@@ -1,5 +1,7 @@
 
 using System;
+using System.IO;
+using System.Reflection;
 
 using MonoDevelop.Core.Services;
 
@@ -14,7 +16,8 @@
 
 		public DefaultLoggingService()
 		{
-			XmlConfigurator.Configure();
+			if (File.Exists (Assembly.GetEntryAssembly().Location + ".config"))
+				XmlConfigurator.Configure();
 		}
 		
 		public override void InitializeService()




More information about the Monodevelop-patches-list mailing list