Return-Path: X-Original-To: apmail-logging-commits-archive@minotaur.apache.org Delivered-To: apmail-logging-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 39B1610A46 for ; Sun, 3 Nov 2013 11:54:29 +0000 (UTC) Received: (qmail 7448 invoked by uid 500); 3 Nov 2013 11:54:27 -0000 Delivered-To: apmail-logging-commits-archive@logging.apache.org Received: (qmail 7418 invoked by uid 500); 3 Nov 2013 11:54:24 -0000 Mailing-List: contact commits-help@logging.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@logging.apache.org Delivered-To: mailing list commits@logging.apache.org Received: (qmail 7409 invoked by uid 99); 3 Nov 2013 11:54:21 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 Nov 2013 11:54:21 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 Nov 2013 11:54:16 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 6CDE423889ED; Sun, 3 Nov 2013 11:53:53 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: svn commit: r1538342 - in /logging/log4net/trunk: ./ src/ src/Appender/ src/Config/ src/Util/ src/Util/PatternStringConverters/ src/Util/TypeConverters/ tests/src/ tests/src/Filter/ tests/src/Util/ Date: Sun, 03 Nov 2013 11:53:52 -0000 To: commits@logging.apache.org From: bodewig@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20131103115353.6CDE423889ED@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: bodewig Date: Sun Nov 3 11:53:52 2013 New Revision: 1538342 URL: http://svn.apache.org/r1538342 Log: remove the NET_2_0 symbol completely, enabling more stuff for Mono on the way Removed: logging/log4net/trunk/tests/src/log4net.Tests.vs2003.csproj Modified: logging/log4net/trunk/log4net.build logging/log4net/trunk/log4net.include logging/log4net/trunk/src/Appender/AdoNetAppender.cs logging/log4net/trunk/src/Appender/EventLogAppender.cs logging/log4net/trunk/src/AssemblyInfo.cs logging/log4net/trunk/src/Config/XmlConfigurator.cs logging/log4net/trunk/src/Util/PatternStringConverters/EnvironmentPatternConverter.cs logging/log4net/trunk/src/Util/SystemInfo.cs logging/log4net/trunk/src/Util/TypeConverters/IPAddressConverter.cs logging/log4net/trunk/src/log4net.vs2008.csproj logging/log4net/trunk/src/log4net.vs2010.csproj logging/log4net/trunk/tests/src/Filter/FilterTest.cs logging/log4net/trunk/tests/src/Util/EnvironmentPatternConverterTest.cs logging/log4net/trunk/tests/src/log4net.Tests.vs2008.csproj logging/log4net/trunk/tests/src/log4net.Tests.vs2010.csproj Modified: logging/log4net/trunk/log4net.build URL: http://svn.apache.org/viewvc/logging/log4net/trunk/log4net.build?rev=1538342&r1=1538341&r2=1538342&view=diff ============================================================================== --- logging/log4net/trunk/log4net.build (original) +++ logging/log4net/trunk/log4net.build Sun Nov 3 11:53:52 2013 @@ -698,6 +698,7 @@ limitations under the License. + @@ -720,6 +721,7 @@ limitations under the License. + @@ -741,6 +743,7 @@ limitations under the License. + Modified: logging/log4net/trunk/log4net.include URL: http://svn.apache.org/viewvc/logging/log4net/trunk/log4net.include?rev=1538342&r1=1538341&r2=1538342&view=diff ============================================================================== --- logging/log4net/trunk/log4net.include (original) +++ logging/log4net/trunk/log4net.include Sun Nov 3 11:53:52 2013 @@ -194,11 +194,11 @@ limitations under the License. - - - - - + + + + + @@ -207,11 +207,11 @@ limitations under the License. - - - - - + + + + + @@ -220,11 +220,11 @@ limitations under the License. - - - - - + + + + + @@ -233,11 +233,11 @@ limitations under the License. - - - - - + + + + + @@ -246,11 +246,11 @@ limitations under the License. - - - - - + + + + + Modified: logging/log4net/trunk/src/Appender/AdoNetAppender.cs URL: http://svn.apache.org/viewvc/logging/log4net/trunk/src/Appender/AdoNetAppender.cs?rev=1538342&r1=1538341&r2=1538342&view=diff ============================================================================== --- logging/log4net/trunk/src/Appender/AdoNetAppender.cs (original) +++ logging/log4net/trunk/src/Appender/AdoNetAppender.cs Sun Nov 3 11:53:52 2013 @@ -179,7 +179,6 @@ namespace log4net.Appender set { m_appSettingsKey = value; } } -#if NET_2_0 /// /// The connectionStrings key from App.Config that contains the connection string. /// @@ -191,7 +190,6 @@ namespace log4net.Appender get { return m_connectionStringName; } set { m_connectionStringName = value; } } -#endif /// /// Gets or sets the type name of the connection @@ -646,7 +644,6 @@ namespace log4net.Appender return m_connectionString; } -#if NET_2_0 if (!String.IsNullOrEmpty(m_connectionStringName)) { ConnectionStringSettings settings = ConfigurationManager.ConnectionStrings[m_connectionStringName]; @@ -660,7 +657,6 @@ namespace log4net.Appender throw new LogException("Unable to find [" + m_connectionStringName + "] ConfigurationManager.ConnectionStrings item"); } } -#endif if (m_appSettingsKey != null && m_appSettingsKey.Length > 0) { @@ -912,12 +908,10 @@ namespace log4net.Appender /// private string m_appSettingsKey; -#if NET_2_0 /// /// The connectionStrings key from App.Config that contains the connection string. /// private string m_connectionStringName; -#endif /// /// String type name of the type name. Modified: logging/log4net/trunk/src/Appender/EventLogAppender.cs URL: http://svn.apache.org/viewvc/logging/log4net/trunk/src/Appender/EventLogAppender.cs?rev=1538342&r1=1538341&r2=1538342&view=diff ============================================================================== --- logging/log4net/trunk/src/Appender/EventLogAppender.cs (original) +++ logging/log4net/trunk/src/Appender/EventLogAppender.cs Sun Nov 3 11:53:52 2013 @@ -342,18 +342,11 @@ namespace log4net.Appender /// /// Create an event log source /// - /// - /// Uses different API calls under NET_2_0 - /// 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/AssemblyInfo.cs URL: http://svn.apache.org/viewvc/logging/log4net/trunk/src/AssemblyInfo.cs?rev=1538342&r1=1538341&r2=1538342&view=diff ============================================================================== --- logging/log4net/trunk/src/AssemblyInfo.cs (original) +++ logging/log4net/trunk/src/AssemblyInfo.cs Sun Nov 3 11:53:52 2013 @@ -54,18 +54,14 @@ using System.Runtime.CompilerServices; #else [assembly: AssemblyTitle("Apache log4net for .NET Framework 4.0")] #endif // Client Profile -#elif (NET_2_0) -#if CLIENT_PROFILE +#elif CLIENT_PROFILE [assembly: AssemblyTitle("Apache log4net for .NET Framework 3.5 Client Profile")] -#else -[assembly: AssemblyTitle("Apache log4net for .NET Framework 2.0")] -#endif // Client Profile #elif (NETCF_2_0) [assembly: AssemblyTitle("Apache log4net for .NET Compact Framework 2.0")] #elif (MONO_2_0) [assembly: AssemblyTitle("Apache log4net for Mono 2.0")] #else -[assembly: AssemblyTitle("Apache log4net")] +[assembly: AssemblyTitle("Apache log4net for .NET Framework 2.0")] #endif #if DEBUG Modified: logging/log4net/trunk/src/Config/XmlConfigurator.cs URL: http://svn.apache.org/viewvc/logging/log4net/trunk/src/Config/XmlConfigurator.cs?rev=1538342&r1=1538341&r2=1538342&view=diff ============================================================================== --- logging/log4net/trunk/src/Config/XmlConfigurator.cs (original) +++ logging/log4net/trunk/src/Config/XmlConfigurator.cs Sun Nov 3 11:53:52 2013 @@ -169,11 +169,7 @@ namespace log4net.Config try { XmlElement configElement = null; -#if NET_2_0 configElement = System.Configuration.ConfigurationManager.GetSection("log4net") as XmlElement; -#else - configElement = System.Configuration.ConfigurationSettings.GetConfig("log4net") as XmlElement; -#endif if (configElement == null) { // Failed to load the xml config using configuration settings handler @@ -724,7 +720,7 @@ namespace log4net.Config #if (NETCF) // Create a text reader for the file stream XmlTextReader xmlReader = new XmlTextReader(configStream); -#elif NET_2_0 +#else // Allow the DTD to specify entity includes XmlReaderSettings settings = new XmlReaderSettings(); // .NET 4.0 warning CS0618: 'System.Xml.XmlReaderSettings.ProhibitDtd' @@ -737,14 +733,6 @@ namespace log4net.Config // Create a reader over the input stream XmlReader xmlReader = XmlReader.Create(configStream, settings); -#else - // Create a validating reader around a text reader for the file stream - XmlValidatingReader xmlReader = new XmlValidatingReader(new XmlTextReader(configStream)); - - // Specify that the reader should not perform validation, but that it should - // expand entity refs. - xmlReader.ValidationType = ValidationType.None; - xmlReader.EntityHandling = EntityHandling.ExpandEntities; #endif // load the data into the document Modified: logging/log4net/trunk/src/Util/PatternStringConverters/EnvironmentPatternConverter.cs URL: http://svn.apache.org/viewvc/logging/log4net/trunk/src/Util/PatternStringConverters/EnvironmentPatternConverter.cs?rev=1538342&r1=1538341&r2=1538342&view=diff ============================================================================== --- logging/log4net/trunk/src/Util/PatternStringConverters/EnvironmentPatternConverter.cs (original) +++ logging/log4net/trunk/src/Util/PatternStringConverters/EnvironmentPatternConverter.cs Sun Nov 3 11:53:52 2013 @@ -65,7 +65,6 @@ namespace log4net.Util.PatternStringConv // Lookup the environment variable string envValue = Environment.GetEnvironmentVariable(this.Option); -#if NET_2_0 // If we didn't see it for the process, try a user level variable. if (envValue == null) { @@ -77,7 +76,6 @@ namespace log4net.Util.PatternStringConv { envValue = Environment.GetEnvironmentVariable(this.Option, EnvironmentVariableTarget.Machine); } -#endif if (envValue != null && envValue.Length > 0) { Modified: logging/log4net/trunk/src/Util/SystemInfo.cs URL: http://svn.apache.org/viewvc/logging/log4net/trunk/src/Util/SystemInfo.cs?rev=1538342&r1=1538341&r2=1538342&view=diff ============================================================================== --- logging/log4net/trunk/src/Util/SystemInfo.cs (original) +++ logging/log4net/trunk/src/Util/SystemInfo.cs Sun Nov 3 11:53:52 2013 @@ -922,21 +922,19 @@ namespace log4net.Util /// public static string GetAppSetting(string key) { - try - { #if NETCF // Configuration APIs are not suported under the Compact Framework -#elif NET_2_0 - return ConfigurationManager.AppSettings[key]; #else - return ConfigurationSettings.AppSettings[key]; -#endif + try + { + return ConfigurationManager.AppSettings[key]; } catch(Exception ex) { // If an exception is thrown here then it looks like the config file does not parse correctly. LogLog.Error(declaringType, "Exception while reading ConfigurationSettings. Check your .config file is well formed XML.", ex); } +#endif return null; } Modified: logging/log4net/trunk/src/Util/TypeConverters/IPAddressConverter.cs URL: http://svn.apache.org/viewvc/logging/log4net/trunk/src/Util/TypeConverters/IPAddressConverter.cs?rev=1538342&r1=1538341&r2=1538342&view=diff ============================================================================== --- logging/log4net/trunk/src/Util/TypeConverters/IPAddressConverter.cs (original) +++ logging/log4net/trunk/src/Util/TypeConverters/IPAddressConverter.cs Sun Nov 3 11:53:52 2013 @@ -77,8 +77,6 @@ namespace log4net.Util.TypeConverters { try { -#if NET_2_0 || NETCF_2_0 - #if !NETCF_2_0 // Try an explicit parse of string representation of an IPAddress (v4 or v6) IPAddress result; @@ -98,33 +96,6 @@ namespace log4net.Util.TypeConverters { return host.AddressList[0]; } -#else - // Before .NET 2 we need to try to parse the IPAddress from the string first - - // Check if the string only contains IP address valid chars - if (str.Trim(validIpAddressChars).Length == 0) - { - try - { - // try to parse the string as an IP address - return IPAddress.Parse(str); - } - catch(FormatException) - { - // Ignore a FormatException, try to resolve via DNS - } - } - - // Try to resolve via DNS. This is a blocking call. - IPHostEntry host = Dns.GetHostByName(str); - if (host != null && - host.AddressList != null && - host.AddressList.Length > 0 && - host.AddressList[0] != null) - { - return host.AddressList[0]; - } -#endif } catch(Exception ex) { @@ -136,9 +107,5 @@ namespace log4net.Util.TypeConverters #endregion - /// - /// Valid characters in an IPv4 or IPv6 address string. (Does not support subnets) - /// - private static readonly char[] validIpAddressChars = {'0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f','A','B','C','D','E','F','x','X','.',':','%'}; } } Modified: logging/log4net/trunk/src/log4net.vs2008.csproj URL: http://svn.apache.org/viewvc/logging/log4net/trunk/src/log4net.vs2008.csproj?rev=1538342&r1=1538341&r2=1538342&view=diff ============================================================================== --- logging/log4net/trunk/src/log4net.vs2008.csproj (original) +++ logging/log4net/trunk/src/log4net.vs2008.csproj Sun Nov 3 11:53:52 2013 @@ -56,7 +56,7 @@ false - TRACE;DEBUG;NET;NET_2_0 + TRACE;DEBUG;NET log4net.xml true 4096 @@ -75,7 +75,7 @@ false - TRACE;STRONG;NET;NET_2_0; + TRACE;STRONG;NET; log4net.xml false 4096 Modified: logging/log4net/trunk/src/log4net.vs2010.csproj URL: http://svn.apache.org/viewvc/logging/log4net/trunk/src/log4net.vs2010.csproj?rev=1538342&r1=1538341&r2=1538342&view=diff ============================================================================== --- logging/log4net/trunk/src/log4net.vs2010.csproj (original) +++ logging/log4net/trunk/src/log4net.vs2010.csproj Sun Nov 3 11:53:52 2013 @@ -1,4 +1,4 @@ - +