svn commit: r378595 - in /logging/log4net/trunk: ./ src/Appender/ src/Config/ src/Core/ src/Repository/Hierarchy/ src/Util/ src/Util/TypeConverters/ tests/src/Appender/ tests/src/Layout/

2006-02-17 Thread nicko
Author: nicko
Date: Fri Feb 17 11:20:22 2006
New Revision: 378595

URL: http://svn.apache.org/viewcvs?rev=378595view=rev
Log:
Fix for LOG4NET-58 Support clean build on .NET 2.0.
Updates to work around obsolete warning messages from the MS .NET 2.0 compiler.

Modified:
logging/log4net/trunk/log4net.build
logging/log4net/trunk/src/Appender/EventLogAppender.cs
logging/log4net/trunk/src/Appender/SmtpAppender.cs
logging/log4net/trunk/src/Config/XmlConfigurator.cs
logging/log4net/trunk/src/Core/DefaultRepositorySelector.cs
logging/log4net/trunk/src/Core/LevelMap.cs
logging/log4net/trunk/src/Core/LoggerManager.cs
logging/log4net/trunk/src/Repository/Hierarchy/XmlHierarchyConfigurator.cs
logging/log4net/trunk/src/Util/LogLog.cs
logging/log4net/trunk/src/Util/SystemInfo.cs
logging/log4net/trunk/src/Util/TypeConverters/IPAddressConverter.cs
logging/log4net/trunk/tests/src/Appender/RemotingAppenderTest.cs
logging/log4net/trunk/tests/src/Layout/XmlLayoutTest.cs

Modified: logging/log4net/trunk/log4net.build
URL: 
http://svn.apache.org/viewcvs/logging/log4net/trunk/log4net.build?rev=378595r1=378594r2=378595view=diff
==
--- logging/log4net/trunk/log4net.build (original)
+++ logging/log4net/trunk/log4net.build Fri Feb 17 11:20:22 2006
@@ -408,6 +408,7 @@
 include name=System.Data.dll /
 include name=System.Web.dll /
 include name=System.Xml.dll /
+include name=System.Configuration.dll /
 !-- allow for third party assemblies to be referenced by 
just storing them in the lib/framework family/framework version/build 
configuration directory --
 include 
name=lib/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}/${current.build.config}/*.dll
 /
 /references

Modified: logging/log4net/trunk/src/Appender/EventLogAppender.cs
URL: 
http://svn.apache.org/viewcvs/logging/log4net/trunk/src/Appender/EventLogAppender.cs?rev=378595r1=378594r2=378595view=diff
==
--- logging/log4net/trunk/src/Appender/EventLogAppender.cs (original)
+++ logging/log4net/trunk/src/Appender/EventLogAppender.cs Fri Feb 17 11:20:22 
2006
@@ -271,13 +271,13 @@
// the application / logfile association
//

EventLog.DeleteEventSource(m_applicationName, m_machineName);
-   
EventLog.CreateEventSource(m_applicationName, m_logName, m_machineName);
+   CreateEventSource(m_applicationName, 
m_logName, m_machineName);
 
registeredLogName = 
EventLog.LogNameFromSourceName(m_applicationName, m_machineName);
}
else if (!sourceAlreadyExists)
{
-   
EventLog.CreateEventSource(m_applicationName, m_logName, m_machineName);
+   CreateEventSource(m_applicationName, 
m_logName, m_machineName);
 
registeredLogName = 
EventLog.LogNameFromSourceName(m_applicationName, m_machineName);
}
@@ -289,6 +289,24 @@
}
 
#endregion // Implementation of IOptionHandler
+
+   /// summary
+   /// Create an event log source
+   /// /summary
+   /// remarks
+   /// Uses different API calls under NET_2_0
+   /// /remarks
+   private static void CreateEventSource(string source, string 
logName, string machineName)
+   {
+#if NET_2_0
+   EventSourceCreationData eventSourceCreationData = new 
EventSourceCreationData(source, logName);
+   eventSourceCreationData.MachineName = machineName;
+   EventLog.CreateEventSource(eventSourceCreationData);
+#else
+   EventLog.CreateEventSource(source, logName, 
machineName);
+#endif
+   }
+ 
 
#region Override implementation of AppenderSkeleton
 

Modified: logging/log4net/trunk/src/Appender/SmtpAppender.cs
URL: 
http://svn.apache.org/viewcvs/logging/log4net/trunk/src/Appender/SmtpAppender.cs?rev=378595r1=378594r2=378595view=diff
==
--- logging/log4net/trunk/src/Appender/SmtpAppender.cs (original)
+++ logging/log4net/trunk/src/Appender/SmtpAppender.cs Fri Feb 17 11:20:22 2006
@@ -22,7 +22,12 @@
 
 using System;
 using System.IO;
+
+#if NET_2_0
+using System.Net.Mail;
+#else
 using 

[jira] Resolved: (LOG4NET-58) Support clean build on .NET 2.0

2006-02-17 Thread Nicko Cadell (JIRA)
 [ http://issues.apache.org/jira/browse/LOG4NET-58?page=all ]
 
Nicko Cadell resolved LOG4NET-58:
-

Fix Version: 1.2.10
 Resolution: Fixed

I have checked in a code change that resolves the obsolete warning messages 
from the .NET 2.0 compiler.

 Support clean build on .NET 2.0
 ---

  Key: LOG4NET-58
  URL: http://issues.apache.org/jira/browse/LOG4NET-58
  Project: Log4net
 Type: Improvement
   Components: Appenders, Builds, Core
 Versions: 1.2.9
  Environment: Tested on .NET 2.0 RTM (v2.0.50727) with Visual Studio 2005 RTM
 Reporter: James Rosenfeld
 Assignee: Nicko Cadell
  Fix For: 1.2.10
  Attachments: log4net-fx-2.0.patch, log4net.2005.csproj, log4net.2005.sln, 
 log4net.Tests.2005.csproj

 Updates to the source that allow building under .NET 2.0 RTM with no source 
 code related warnings.  Warnings that do appear are related to xml 
 documentation, and a deprecated nant method call.  Updates are commented as 
 appropriate to indicate the compiler warning resolved.
 I updated the nant build file to include a new reference needed for 2.0 but 
 since nant (as of 0.85 rc3) doesn't recognize the new framework yet I was 
 unable to test building using the nant build.  Visual Studio 2005 
 solution/project files are attached.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira



svn commit: r378601 - /logging/log4net/trunk/build.cmd

2006-02-17 Thread nicko
Author: nicko
Date: Fri Feb 17 11:25:53 2006
New Revision: 378601

URL: http://svn.apache.org/viewcvs?rev=378601view=rev
Log:
Updated to support NAnt.exe path that contains spaces. Added quoting around 
variable.

Modified:
logging/log4net/trunk/build.cmd

Modified: logging/log4net/trunk/build.cmd
URL: 
http://svn.apache.org/viewcvs/logging/log4net/trunk/build.cmd?rev=378601r1=378600r2=378601view=diff
==
--- logging/log4net/trunk/build.cmd (original)
+++ logging/log4net/trunk/build.cmd Fri Feb 17 11:25:53 2006
@@ -14,12 +14,12 @@
 
 REM Try and determine if NAnt is in the PATH
 SET NANTEXE_PATH=nant.exe
-%NANTEXE_PATH% -help NUL: 2NUL:
+%NANTEXE_PATH% -help NUL: 2NUL:
 IF NOT ERRORLEVEL 1 goto FoundNAnt
 
 REM Try hard coded path for NAnt
-SET NANTEXE_PATH=C:\net\nant-0.85-rc1\bin\nant.exe
-%NANTEXE_PATH% -help NUL: 2NUL:
+SET NANTEXE_PATH=C:\Program 
Files\NAnt\nant-0.85-nightly-2005-12-13\bin\nant.exe
+%NANTEXE_PATH% -help NUL: 2NUL:
 IF NOT ERRORLEVEL 1 goto FoundNAnt
 
 REM We have not found NAnt