You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by bo...@apache.org on 2015/08/23 18:33:08 UTC
svn commit: r1697216 - in /logging/log4net/branches/log4net-1.2.x: ./
src/Appender/ src/Config/ src/Core/ src/Plugin/ src/Repository/Hierarchy/
src/Util/ src/Util/PatternStringConverters/ tests/src/ tests/src/Appender/
tests/src/Layout/ tests/src/Util/
Author: bodewig
Date: Sun Aug 23 16:33:07 2015
New Revision: 1697216
URL: http://svn.apache.org/r1697216
Log:
properly deal with Mono>2 symbols
Modified:
logging/log4net/branches/log4net-1.2.x/log4net.build
logging/log4net/branches/log4net-1.2.x/src/Appender/ColoredConsoleAppender.cs
logging/log4net/branches/log4net-1.2.x/src/Appender/FileAppender.cs
logging/log4net/branches/log4net-1.2.x/src/Appender/LocalSyslogAppender.cs
logging/log4net/branches/log4net-1.2.x/src/Appender/NetSendAppender.cs
logging/log4net/branches/log4net-1.2.x/src/Appender/OutputDebugStringAppender.cs
logging/log4net/branches/log4net-1.2.x/src/Appender/RemotingAppender.cs
logging/log4net/branches/log4net-1.2.x/src/Appender/SmtpAppender.cs
logging/log4net/branches/log4net-1.2.x/src/Config/XmlConfigurator.cs
logging/log4net/branches/log4net-1.2.x/src/Core/DefaultRepositorySelector.cs
logging/log4net/branches/log4net-1.2.x/src/Core/LoggingEvent.cs
logging/log4net/branches/log4net-1.2.x/src/Plugin/RemoteLoggingServerPlugin.cs
logging/log4net/branches/log4net-1.2.x/src/Repository/Hierarchy/Logger.cs
logging/log4net/branches/log4net-1.2.x/src/Util/ILogExtensions.cs
logging/log4net/branches/log4net-1.2.x/src/Util/LogicalThreadContextProperties.cs
logging/log4net/branches/log4net-1.2.x/src/Util/NativeError.cs
logging/log4net/branches/log4net-1.2.x/src/Util/PatternStringConverters/ProcessIdPatternConverter.cs
logging/log4net/branches/log4net-1.2.x/src/Util/ReadOnlyPropertiesDictionary.cs
logging/log4net/branches/log4net-1.2.x/src/Util/ReaderWriterLock.cs
logging/log4net/branches/log4net-1.2.x/src/Util/SystemInfo.cs
logging/log4net/branches/log4net-1.2.x/src/Util/SystemStringFormat.cs
logging/log4net/branches/log4net-1.2.x/src/Util/WindowsSecurityContext.cs
logging/log4net/branches/log4net-1.2.x/tests/src/ (props changed)
logging/log4net/branches/log4net-1.2.x/tests/src/Appender/RemotingAppenderTest.cs
logging/log4net/branches/log4net-1.2.x/tests/src/Layout/XmlLayoutTest.cs
logging/log4net/branches/log4net-1.2.x/tests/src/Util/SystemInfoTest.cs
Modified: logging/log4net/branches/log4net-1.2.x/log4net.build
URL: http://svn.apache.org/viewvc/logging/log4net/branches/log4net-1.2.x/log4net.build?rev=1697216&r1=1697215&r2=1697216&view=diff
==============================================================================
--- logging/log4net/branches/log4net-1.2.x/log4net.build (original)
+++ logging/log4net/branches/log4net-1.2.x/log4net.build Sun Aug 23 16:33:07 2015
@@ -1264,6 +1264,7 @@ limitations under the License.
</resources>
<references>
<include name="System.dll" />
+ <include name="System.Core.dll" />
<include name="System.Data.dll" />
<include name="System.Web.dll" />
<include name="System.Xml.dll" />
@@ -1286,6 +1287,7 @@ limitations under the License.
</resources>
<references>
<include name="System.dll" />
+ <include name="System.Core.dll" />
<include name="System.Data.dll" />
<include name="System.Web.dll" />
<include name="System.Xml.dll" />
@@ -1307,6 +1309,7 @@ limitations under the License.
</resources>
<references>
<include name="System.dll" />
+ <include name="System.Core.dll" />
<include name="System.Data.dll" />
<include name="System.Web.dll" />
<include name="System.Xml.dll" />
@@ -1349,6 +1352,7 @@ limitations under the License.
</resources>
<references>
<include name="System.dll" />
+ <include name="System.Core.dll" />
<include name="System.Data.dll" />
<include name="System.Web.dll" />
<include name="System.Xml.dll" />
@@ -1371,6 +1375,7 @@ limitations under the License.
</resources>
<references>
<include name="System.dll" />
+ <include name="System.Core.dll" />
<include name="System.Data.dll" />
<include name="System.Web.dll" />
<include name="System.Xml.dll" />
@@ -1392,6 +1397,7 @@ limitations under the License.
</resources>
<references>
<include name="System.dll" />
+ <include name="System.Core.dll" />
<include name="System.Data.dll" />
<include name="System.Web.dll" />
<include name="System.Xml.dll" />
Modified: logging/log4net/branches/log4net-1.2.x/src/Appender/ColoredConsoleAppender.cs
URL: http://svn.apache.org/viewvc/logging/log4net/branches/log4net-1.2.x/src/Appender/ColoredConsoleAppender.cs?rev=1697216&r1=1697215&r2=1697216&view=diff
==============================================================================
--- logging/log4net/branches/log4net-1.2.x/src/Appender/ColoredConsoleAppender.cs (original)
+++ logging/log4net/branches/log4net-1.2.x/src/Appender/ColoredConsoleAppender.cs Sun Aug 23 16:33:07 2015
@@ -265,7 +265,7 @@ namespace log4net.Appender
/// The format of the output will depend on the appender's layout.
/// </para>
/// </remarks>
-#if NET_4_0
+#if NET_4_0 || MONO_4_0
[System.Security.SecuritySafeCritical]
#endif
[System.Security.Permissions.SecurityPermission(System.Security.Permissions.SecurityAction.Demand, UnmanagedCode = true)]
@@ -434,7 +434,7 @@ namespace log4net.Appender
/// Initialize the level to color mappings set on this appender.
/// </para>
/// </remarks>
-#if NET_4_0
+#if NET_4_0 || MONO_4_0
[System.Security.SecuritySafeCritical]
#endif
[System.Security.Permissions.SecurityPermission(System.Security.Permissions.SecurityAction.Demand, UnmanagedCode=true)]
Modified: logging/log4net/branches/log4net-1.2.x/src/Appender/FileAppender.cs
URL: http://svn.apache.org/viewvc/logging/log4net/branches/log4net-1.2.x/src/Appender/FileAppender.cs?rev=1697216&r1=1697215&r2=1697216&view=diff
==============================================================================
--- logging/log4net/branches/log4net-1.2.x/src/Appender/FileAppender.cs (original)
+++ logging/log4net/branches/log4net-1.2.x/src/Appender/FileAppender.cs Sun Aug 23 16:33:07 2015
@@ -664,7 +664,7 @@ namespace log4net.Appender
/// -<see cref="ReleaseLock"/> and <see cref="CloseFile"/>.
/// </para>
/// </remarks>
-#if NET_4_0
+#if NET_4_0 || MONO_4_0
[System.Security.SecuritySafeCritical]
#endif
public override void OpenFile(string filename, bool append, Encoding encoding)
Modified: logging/log4net/branches/log4net-1.2.x/src/Appender/LocalSyslogAppender.cs
URL: http://svn.apache.org/viewvc/logging/log4net/branches/log4net-1.2.x/src/Appender/LocalSyslogAppender.cs?rev=1697216&r1=1697215&r2=1697216&view=diff
==============================================================================
--- logging/log4net/branches/log4net-1.2.x/src/Appender/LocalSyslogAppender.cs (original)
+++ logging/log4net/branches/log4net-1.2.x/src/Appender/LocalSyslogAppender.cs Sun Aug 23 16:33:07 2015
@@ -337,7 +337,7 @@ namespace log4net.Appender
/// <see cref="ActivateOptions"/> must be called again.
/// </para>
/// </remarks>
-#if NET_4_0
+#if NET_4_0 || MONO_4_0
[System.Security.SecuritySafeCritical]
#endif
public override void ActivateOptions()
@@ -378,7 +378,7 @@ namespace log4net.Appender
/// The format of the output will depend on the appender's layout.
/// </para>
/// </remarks>
-#if NET_4_0
+#if NET_4_0 || MONO_4_0
[System.Security.SecuritySafeCritical]
#endif
[System.Security.Permissions.SecurityPermission(System.Security.Permissions.SecurityAction.Demand, UnmanagedCode = true)]
@@ -400,7 +400,7 @@ namespace log4net.Appender
/// Close the syslog when the appender is closed
/// </para>
/// </remarks>
-#if NET_4_0
+#if NET_4_0 || MONO_4_0
[System.Security.SecuritySafeCritical]
#endif
protected override void OnClose()
Modified: logging/log4net/branches/log4net-1.2.x/src/Appender/NetSendAppender.cs
URL: http://svn.apache.org/viewvc/logging/log4net/branches/log4net-1.2.x/src/Appender/NetSendAppender.cs?rev=1697216&r1=1697215&r2=1697216&view=diff
==============================================================================
--- logging/log4net/branches/log4net-1.2.x/src/Appender/NetSendAppender.cs (original)
+++ logging/log4net/branches/log4net-1.2.x/src/Appender/NetSendAppender.cs Sun Aug 23 16:33:07 2015
@@ -304,7 +304,7 @@ namespace log4net.Appender
/// Sends the event using a network message.
/// </para>
/// </remarks>
-#if NET_4_0
+#if NET_4_0 || MONO_4_0
[System.Security.SecuritySafeCritical]
#endif
[System.Security.Permissions.SecurityPermission(System.Security.Permissions.SecurityAction.Demand, UnmanagedCode = true)]
Modified: logging/log4net/branches/log4net-1.2.x/src/Appender/OutputDebugStringAppender.cs
URL: http://svn.apache.org/viewvc/logging/log4net/branches/log4net-1.2.x/src/Appender/OutputDebugStringAppender.cs?rev=1697216&r1=1697215&r2=1697216&view=diff
==============================================================================
--- logging/log4net/branches/log4net-1.2.x/src/Appender/OutputDebugStringAppender.cs (original)
+++ logging/log4net/branches/log4net-1.2.x/src/Appender/OutputDebugStringAppender.cs Sun Aug 23 16:33:07 2015
@@ -75,7 +75,7 @@ namespace log4net.Appender
/// Write the logging event to the output debug string API
/// </para>
/// </remarks>
-#if NET_4_0
+#if NET_4_0 || MONO_4_0
[System.Security.SecuritySafeCritical]
#elif !NETCF
[System.Security.Permissions.SecurityPermission(System.Security.Permissions.SecurityAction.Demand, UnmanagedCode = true)]
Modified: logging/log4net/branches/log4net-1.2.x/src/Appender/RemotingAppender.cs
URL: http://svn.apache.org/viewvc/logging/log4net/branches/log4net-1.2.x/src/Appender/RemotingAppender.cs?rev=1697216&r1=1697215&r2=1697216&view=diff
==============================================================================
--- logging/log4net/branches/log4net-1.2.x/src/Appender/RemotingAppender.cs (original)
+++ logging/log4net/branches/log4net-1.2.x/src/Appender/RemotingAppender.cs Sun Aug 23 16:33:07 2015
@@ -138,7 +138,7 @@ namespace log4net.Appender
/// <see cref="ActivateOptions"/> must be called again.
/// </para>
/// </remarks>
-#if NET_4_0
+#if NET_4_0 || MONO_4_0
[System.Security.SecuritySafeCritical]
#endif
override public void ActivateOptions()
Modified: logging/log4net/branches/log4net-1.2.x/src/Appender/SmtpAppender.cs
URL: http://svn.apache.org/viewvc/logging/log4net/branches/log4net-1.2.x/src/Appender/SmtpAppender.cs?rev=1697216&r1=1697215&r2=1697216&view=diff
==============================================================================
--- logging/log4net/branches/log4net-1.2.x/src/Appender/SmtpAppender.cs (original)
+++ logging/log4net/branches/log4net-1.2.x/src/Appender/SmtpAppender.cs Sun Aug 23 16:33:07 2015
@@ -488,7 +488,7 @@ namespace log4net.Appender
{
// .NET 4.0 warning CS0618: 'System.Net.Mail.MailMessage.ReplyTo' is obsolete:
// 'ReplyTo is obsoleted for this type. Please use ReplyToList instead which can accept multiple addresses. http://go.microsoft.com/fwlink/?linkid=14202'
-#if !NET_4_0
+#if !NET_4_0 && !MONO_4_0
mailMessage.ReplyTo = new MailAddress(m_replyTo);
#else
mailMessage.ReplyToList.Add(new MailAddress(m_replyTo));
Modified: logging/log4net/branches/log4net-1.2.x/src/Config/XmlConfigurator.cs
URL: http://svn.apache.org/viewvc/logging/log4net/branches/log4net-1.2.x/src/Config/XmlConfigurator.cs?rev=1697216&r1=1697215&r2=1697216&view=diff
==============================================================================
--- logging/log4net/branches/log4net-1.2.x/src/Config/XmlConfigurator.cs (original)
+++ logging/log4net/branches/log4net-1.2.x/src/Config/XmlConfigurator.cs Sun Aug 23 16:33:07 2015
@@ -730,7 +730,7 @@ namespace log4net.Config
XmlReaderSettings settings = new XmlReaderSettings();
// .NET 4.0 warning CS0618: 'System.Xml.XmlReaderSettings.ProhibitDtd'
// is obsolete: 'Use XmlReaderSettings.DtdProcessing property instead.'
-#if !NET_4_0
+#if !NET_4_0 && !MONO_4_0
settings.ProhibitDtd = false;
#else
settings.DtdProcessing = DtdProcessing.Parse;
@@ -963,7 +963,7 @@ namespace log4net.Config
/// Initializes a new instance of the <see cref="ConfigureAndWatchHandler" /> class.
/// </para>
/// </remarks>
-#if NET_4_0
+#if NET_4_0 || MONO_4_0
[System.Security.SecuritySafeCritical]
#endif
public ConfigureAndWatchHandler(ILoggerRepository repository, FileInfo configFile)
@@ -1043,7 +1043,7 @@ namespace log4net.Config
/// <summary>
/// Release the handles held by the watcher and timer.
/// </summary>
-#if NET_4_0
+#if NET_4_0 || MONO_4_0
[System.Security.SecuritySafeCritical]
#endif
public void Dispose()
Modified: logging/log4net/branches/log4net-1.2.x/src/Core/DefaultRepositorySelector.cs
URL: http://svn.apache.org/viewvc/logging/log4net/branches/log4net-1.2.x/src/Core/DefaultRepositorySelector.cs?rev=1697216&r1=1697215&r2=1697216&view=diff
==============================================================================
--- logging/log4net/branches/log4net-1.2.x/src/Core/DefaultRepositorySelector.cs (original)
+++ logging/log4net/branches/log4net-1.2.x/src/Core/DefaultRepositorySelector.cs Sun Aug 23 16:33:07 2015
@@ -705,7 +705,7 @@ namespace log4net.Core
// Determine whether to watch the file or not based on an app setting value:
bool watchRepositoryConfigFile = false;
-#if NET_2_0 || MONO_2_0
+#if NET_2_0 || MONO_2_0 || MONO_3_5 || MONO_4_0
Boolean.TryParse(SystemInfo.GetAppSetting("log4net.Config.Watch"), out watchRepositoryConfigFile);
#else
{
Modified: logging/log4net/branches/log4net-1.2.x/src/Core/LoggingEvent.cs
URL: http://svn.apache.org/viewvc/logging/log4net/branches/log4net-1.2.x/src/Core/LoggingEvent.cs?rev=1697216&r1=1697215&r2=1697216&view=diff
==============================================================================
--- logging/log4net/branches/log4net-1.2.x/src/Core/LoggingEvent.cs (original)
+++ logging/log4net/branches/log4net-1.2.x/src/Core/LoggingEvent.cs Sun Aug 23 16:33:07 2015
@@ -1022,7 +1022,7 @@ namespace log4net.Core
/// is to be used outside that method.
/// </para>
/// </remarks>
-#if NET_4_0
+#if NET_4_0 || MONO_4_0
[System.Security.SecurityCritical]
#else
[System.Security.Permissions.SecurityPermissionAttribute(System.Security.Permissions.SecurityAction.Demand, SerializationFormatter=true)]
Modified: logging/log4net/branches/log4net-1.2.x/src/Plugin/RemoteLoggingServerPlugin.cs
URL: http://svn.apache.org/viewvc/logging/log4net/branches/log4net-1.2.x/src/Plugin/RemoteLoggingServerPlugin.cs?rev=1697216&r1=1697215&r2=1697216&view=diff
==============================================================================
--- logging/log4net/branches/log4net-1.2.x/src/Plugin/RemoteLoggingServerPlugin.cs (original)
+++ logging/log4net/branches/log4net-1.2.x/src/Plugin/RemoteLoggingServerPlugin.cs Sun Aug 23 16:33:07 2015
@@ -119,7 +119,7 @@ namespace log4net.Plugin
/// This method is called when the plugin is attached to the repository.
/// </para>
/// </remarks>
-#if NET_4_0
+#if NET_4_0 || MONO_4_0
[System.Security.SecuritySafeCritical]
#endif
override public void Attach(ILoggerRepository repository)
@@ -148,7 +148,7 @@ namespace log4net.Plugin
/// sink is disconnected.
/// </para>
/// </remarks>
-#if NET_4_0
+#if NET_4_0 || MONO_4_0
[System.Security.SecuritySafeCritical]
#endif
override public void Shutdown()
@@ -253,7 +253,7 @@ namespace log4net.Plugin
/// therefore this implementation returns <c>null</c>.
/// </para>
/// </remarks>
-#if NET_4_0
+#if NET_4_0 || MONO_4_0
[System.Security.SecurityCritical]
#endif
public override object InitializeLifetimeService()
Modified: logging/log4net/branches/log4net-1.2.x/src/Repository/Hierarchy/Logger.cs
URL: http://svn.apache.org/viewvc/logging/log4net/branches/log4net-1.2.x/src/Repository/Hierarchy/Logger.cs?rev=1697216&r1=1697215&r2=1697216&view=diff
==============================================================================
--- logging/log4net/branches/log4net-1.2.x/src/Repository/Hierarchy/Logger.cs (original)
+++ logging/log4net/branches/log4net-1.2.x/src/Repository/Hierarchy/Logger.cs Sun Aug 23 16:33:07 2015
@@ -432,7 +432,7 @@ namespace log4net.Repository.Hierarchy
{
log4net.Util.LogLog.Error(declaringType, "Exception while logging", ex);
}
-#if !NET_2_0 && !MONO_2_0
+#if !NET_2_0 && !MONO_2_0 && !MONO_3_5 && !MONO_4_0
catch
{
log4net.Util.LogLog.Error(declaringType, "Exception while logging");
@@ -469,7 +469,7 @@ namespace log4net.Repository.Hierarchy
{
log4net.Util.LogLog.Error(declaringType, "Exception while logging", ex);
}
-#if !NET_2_0 && !MONO_2_0
+#if !NET_2_0 && !MONO_2_0 && !MONO_3_5 && !MONO_4_0
catch
{
log4net.Util.LogLog.Error(declaringType, "Exception while logging");
@@ -509,7 +509,7 @@ namespace log4net.Repository.Hierarchy
{
log4net.Util.LogLog.Error(declaringType, "Exception while logging", ex);
}
-#if !NET_2_0 && !MONO_2_0
+#if !NET_2_0 && !MONO_2_0 && !MONO_3_5 && !MONO_4_0
catch
{
log4net.Util.LogLog.Error(declaringType, "Exception while logging");
Modified: logging/log4net/branches/log4net-1.2.x/src/Util/ILogExtensions.cs
URL: http://svn.apache.org/viewvc/logging/log4net/branches/log4net-1.2.x/src/Util/ILogExtensions.cs?rev=1697216&r1=1697215&r2=1697216&view=diff
==============================================================================
--- logging/log4net/branches/log4net-1.2.x/src/Util/ILogExtensions.cs (original)
+++ logging/log4net/branches/log4net-1.2.x/src/Util/ILogExtensions.cs Sun Aug 23 16:33:07 2015
@@ -17,7 +17,7 @@
//
#endregion
-#if NET_3_5 || NET_4_0
+#if NET_3_5 || NET_4_0 || MONO_3_5 || MONO_4_0
using System;
Modified: logging/log4net/branches/log4net-1.2.x/src/Util/LogicalThreadContextProperties.cs
URL: http://svn.apache.org/viewvc/logging/log4net/branches/log4net-1.2.x/src/Util/LogicalThreadContextProperties.cs?rev=1697216&r1=1697215&r2=1697216&view=diff
==============================================================================
--- logging/log4net/branches/log4net-1.2.x/src/Util/LogicalThreadContextProperties.cs (original)
+++ logging/log4net/branches/log4net-1.2.x/src/Util/LogicalThreadContextProperties.cs Sun Aug 23 16:33:07 2015
@@ -211,12 +211,12 @@ namespace log4net.Util
/// security link demand, therfore we must put the method call in a seperate method
/// that we can wrap in an exception handler.
/// </remarks>
-#if NET_4_0
+#if NET_4_0 || MONO_4_0
[System.Security.SecuritySafeCritical]
#endif
private static PropertiesDictionary GetCallContextData()
{
-#if NET_2_0 || MONO_2_0
+#if NET_2_0 || MONO_2_0 || MONO_3_5 || MONO_4_0
return CallContext.LogicalGetData(c_SlotName) as PropertiesDictionary;
#else
return CallContext.GetData(c_SlotName) as PropertiesDictionary;
@@ -232,12 +232,12 @@ namespace log4net.Util
/// security link demand, therfore we must put the method call in a seperate method
/// that we can wrap in an exception handler.
/// </remarks>
-#if NET_4_0
+#if NET_4_0 || MONO_4_0
[System.Security.SecuritySafeCritical]
#endif
private static void SetCallContextData(PropertiesDictionary properties)
{
-#if NET_2_0 || MONO_2_0
+#if NET_2_0 || MONO_2_0 || MONO_3_5 || MONO_4_0
CallContext.LogicalSetData(c_SlotName, properties);
#else
CallContext.SetData(c_SlotName, properties);
Modified: logging/log4net/branches/log4net-1.2.x/src/Util/NativeError.cs
URL: http://svn.apache.org/viewvc/logging/log4net/branches/log4net-1.2.x/src/Util/NativeError.cs?rev=1697216&r1=1697215&r2=1697216&view=diff
==============================================================================
--- logging/log4net/branches/log4net-1.2.x/src/Util/NativeError.cs (original)
+++ logging/log4net/branches/log4net-1.2.x/src/Util/NativeError.cs Sun Aug 23 16:33:07 2015
@@ -114,7 +114,7 @@ namespace log4net.Util
/// native Win32 <c>FormatMessage</c> function.
/// </para>
/// </remarks>
-#if NET_4_0
+#if NET_4_0 || MONO_4_0
[System.Security.SecuritySafeCritical]
#elif !NETCF
[System.Security.Permissions.SecurityPermission(System.Security.Permissions.SecurityAction.Demand, UnmanagedCode=true)]
@@ -157,7 +157,7 @@ namespace log4net.Util
/// using the native <c>FormatMessage</c> function.
/// </para>
/// </remarks>
-#if NET_4_0
+#if NET_4_0 || MONO_4_0
[System.Security.SecuritySafeCritical]
#elif !NETCF
[System.Security.Permissions.SecurityPermission(System.Security.Permissions.SecurityAction.Demand, UnmanagedCode = true)]
Modified: logging/log4net/branches/log4net-1.2.x/src/Util/PatternStringConverters/ProcessIdPatternConverter.cs
URL: http://svn.apache.org/viewvc/logging/log4net/branches/log4net-1.2.x/src/Util/PatternStringConverters/ProcessIdPatternConverter.cs?rev=1697216&r1=1697215&r2=1697216&view=diff
==============================================================================
--- logging/log4net/branches/log4net-1.2.x/src/Util/PatternStringConverters/ProcessIdPatternConverter.cs (original)
+++ logging/log4net/branches/log4net-1.2.x/src/Util/PatternStringConverters/ProcessIdPatternConverter.cs Sun Aug 23 16:33:07 2015
@@ -46,7 +46,7 @@ namespace log4net.Util.PatternStringConv
/// Write the current process ID to the output <paramref name="writer"/>.
/// </para>
/// </remarks>
-#if NET_4_0
+#if NET_4_0 || MONO_4_0
[System.Security.SecuritySafeCritical]
#endif
override protected void Convert(TextWriter writer, object state)
Modified: logging/log4net/branches/log4net-1.2.x/src/Util/ReadOnlyPropertiesDictionary.cs
URL: http://svn.apache.org/viewvc/logging/log4net/branches/log4net-1.2.x/src/Util/ReadOnlyPropertiesDictionary.cs?rev=1697216&r1=1697215&r2=1697216&view=diff
==============================================================================
--- logging/log4net/branches/log4net-1.2.x/src/Util/ReadOnlyPropertiesDictionary.cs (original)
+++ logging/log4net/branches/log4net-1.2.x/src/Util/ReadOnlyPropertiesDictionary.cs Sun Aug 23 16:33:07 2015
@@ -203,7 +203,7 @@ namespace log4net.Util
/// Serializes this object into the <see cref="SerializationInfo" /> provided.
/// </para>
/// </remarks>
-#if NET_4_0
+#if NET_4_0 || MONO_4_0
[System.Security.SecurityCritical]
#else
[System.Security.Permissions.SecurityPermissionAttribute(System.Security.Permissions.SecurityAction.Demand, SerializationFormatter=true)]
Modified: logging/log4net/branches/log4net-1.2.x/src/Util/ReaderWriterLock.cs
URL: http://svn.apache.org/viewvc/logging/log4net/branches/log4net-1.2.x/src/Util/ReaderWriterLock.cs?rev=1697216&r1=1697215&r2=1697216&view=diff
==============================================================================
--- logging/log4net/branches/log4net-1.2.x/src/Util/ReaderWriterLock.cs (original)
+++ logging/log4net/branches/log4net-1.2.x/src/Util/ReaderWriterLock.cs Sun Aug 23 16:33:07 2015
@@ -20,7 +20,7 @@
#if (!NETCF)
#define HAS_READERWRITERLOCK
#endif
-#if (NET_4_0)
+#if NET_4_0 || MONO_4_0
#define HAS_READERWRITERLOCKSLIM
#endif
Modified: logging/log4net/branches/log4net-1.2.x/src/Util/SystemInfo.cs
URL: http://svn.apache.org/viewvc/logging/log4net/branches/log4net-1.2.x/src/Util/SystemInfo.cs?rev=1697216&r1=1697215&r2=1697216&view=diff
==============================================================================
--- logging/log4net/branches/log4net-1.2.x/src/Util/SystemInfo.cs (original)
+++ logging/log4net/branches/log4net-1.2.x/src/Util/SystemInfo.cs Sun Aug 23 16:33:07 2015
@@ -225,7 +225,7 @@ namespace log4net.Util
{
#if NETCF_1_0
return System.Threading.Thread.CurrentThread.GetHashCode();
-#elif NET_2_0 || NETCF_2_0 || MONO_2_0
+#elif NET_2_0 || NETCF_2_0 || MONO_2_0 || MONO_3_5 || MONO_4_0
return System.Threading.Thread.CurrentThread.ManagedThreadId;
#else
return AppDomain.GetCurrentThreadId();
@@ -457,7 +457,7 @@ namespace log4net.Util
{
try
{
-#if NET_4_0
+#if NET_4_0 || MONO_4_0
if (myAssembly.IsDynamic)
{
return "Dynamic Assembly";
@@ -1027,7 +1027,7 @@ namespace log4net.Util
{
#if NETCF_1_0
return new Hashtable(CaseInsensitiveHashCodeProvider.Default, CaseInsensitiveComparer.Default);
-#elif NETCF_2_0 || NET_2_0 || MONO_2_0
+#elif NETCF_2_0 || NET_2_0 || MONO_2_0 || MONO_3_5 || MONO_4_0
return new Hashtable(StringComparer.OrdinalIgnoreCase);
#else
return System.Collections.Specialized.CollectionsUtil.CreateCaseInsensitiveHashtable();
Modified: logging/log4net/branches/log4net-1.2.x/src/Util/SystemStringFormat.cs
URL: http://svn.apache.org/viewvc/logging/log4net/branches/log4net-1.2.x/src/Util/SystemStringFormat.cs?rev=1697216&r1=1697215&r2=1697216&view=diff
==============================================================================
--- logging/log4net/branches/log4net-1.2.x/src/Util/SystemStringFormat.cs (original)
+++ logging/log4net/branches/log4net-1.2.x/src/Util/SystemStringFormat.cs Sun Aug 23 16:33:07 2015
@@ -109,7 +109,7 @@ namespace log4net.Util
log4net.Util.LogLog.Warn(declaringType, "Exception while rendering format ["+format+"]", ex);
return StringFormatError(ex, format, args);
}
-#if !NET_2_0 && !MONO_2_0
+#if !NET_2_0 && !MONO_2_0 && !MONO_3_5 && !MONO_4_0
catch
{
log4net.Util.LogLog.Warn(declaringType, "Exception while rendering format ["+format+"]");
@@ -148,7 +148,7 @@ namespace log4net.Util
log4net.Util.LogLog.Error(declaringType, "INTERNAL ERROR during StringFormat error handling", ex);
return "<log4net.Error>Exception during StringFormat. See Internal Log.</log4net.Error>";
}
-#if !NET_2_0 && !MONO_2_0
+#if !NET_2_0 && !MONO_2_0 && !MONO_3_5 && !MONO_4_0
catch
{
log4net.Util.LogLog.Error(declaringType, "INTERNAL ERROR during StringFormat error handling");
@@ -210,7 +210,7 @@ namespace log4net.Util
{
buffer.Append("<Exception: ").Append(ex.Message).Append(">");
}
-#if !NET_2_0 && !MONO_2_0
+#if !NET_2_0 && !MONO_2_0 && !MONO_3_5 && !MONO_4_0
catch
{
buffer.Append("<Exception>");
Modified: logging/log4net/branches/log4net-1.2.x/src/Util/WindowsSecurityContext.cs
URL: http://svn.apache.org/viewvc/logging/log4net/branches/log4net-1.2.x/src/Util/WindowsSecurityContext.cs?rev=1697216&r1=1697215&r2=1697216&view=diff
==============================================================================
--- logging/log4net/branches/log4net-1.2.x/src/Util/WindowsSecurityContext.cs (original)
+++ logging/log4net/branches/log4net-1.2.x/src/Util/WindowsSecurityContext.cs Sun Aug 23 16:33:07 2015
@@ -275,7 +275,7 @@ namespace log4net.Util
/// token is used to initialize the WindowsIdentity.
/// </para>
/// </remarks>
-#if NET_4_0
+#if NET_4_0 || MONO_4_0
[System.Security.SecuritySafeCritical]
#endif
[System.Security.Permissions.SecurityPermission(System.Security.Permissions.SecurityAction.Demand, UnmanagedCode = true)]
Propchange: logging/log4net/branches/log4net-1.2.x/tests/src/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Aug 23 16:33:07 2015
@@ -1,4 +1,4 @@
/logging/log4net/branches/1.2.12/tests/src:1511686-1520870
/logging/log4net/tags/1.2.13RC1/tests/src:1539445-1539920
-/logging/log4net/trunk/src/log4net.Tests:1669884,1669888,1669954
+/logging/log4net/trunk/src/log4net.Tests:1669884,1669888,1669954,1670104
/logging/log4net/trunk/tests/src:1539083
Modified: logging/log4net/branches/log4net-1.2.x/tests/src/Appender/RemotingAppenderTest.cs
URL: http://svn.apache.org/viewvc/logging/log4net/branches/log4net-1.2.x/tests/src/Appender/RemotingAppenderTest.cs?rev=1697216&r1=1697215&r2=1697216&view=diff
==============================================================================
--- logging/log4net/branches/log4net-1.2.x/tests/src/Appender/RemotingAppenderTest.cs (original)
+++ logging/log4net/branches/log4net-1.2.x/tests/src/Appender/RemotingAppenderTest.cs Sun Aug 23 16:33:07 2015
@@ -207,7 +207,7 @@ namespace log4net.Tests.Appender
// Setup remoting server
try
{
-#if NET_2_0 || MONO_2_0
+#if NET_2_0 || MONO_2_0 || MONO_3_5 || MONO_4_0
ChannelServices.RegisterChannel(m_remotingChannel, false);
#else
ChannelServices.RegisterChannel(m_remotingChannel);
Modified: logging/log4net/branches/log4net-1.2.x/tests/src/Layout/XmlLayoutTest.cs
URL: http://svn.apache.org/viewvc/logging/log4net/branches/log4net-1.2.x/tests/src/Layout/XmlLayoutTest.cs?rev=1697216&r1=1697215&r2=1697216&view=diff
==============================================================================
--- logging/log4net/branches/log4net-1.2.x/tests/src/Layout/XmlLayoutTest.cs (original)
+++ logging/log4net/branches/log4net-1.2.x/tests/src/Layout/XmlLayoutTest.cs Sun Aug 23 16:33:07 2015
@@ -81,7 +81,7 @@ namespace log4net.Tests.Layout
private static string CreateEventNode(string message)
{
return String.Format("<event logger=\"TestLogger\" timestamp=\"{0}\" level=\"INFO\" thread=\"TestThread\" domain=\"Tests\" identity=\"TestRunner\" username=\"TestRunner\"><message>{1}</message></event>" + Environment.NewLine,
-#if NET_2_0 || MONO_2_0
+#if NET_2_0 || MONO_2_0 || MONO_3_5 || MONO_4_0
XmlConvert.ToString(DateTime.Today, XmlDateTimeSerializationMode.Local),
#else
XmlConvert.ToString(DateTime.Today),
@@ -92,7 +92,7 @@ namespace log4net.Tests.Layout
private static string CreateEventNode(string key, string value)
{
return String.Format("<event logger=\"TestLogger\" timestamp=\"{0}\" level=\"INFO\" thread=\"TestThread\" domain=\"Tests\" identity=\"TestRunner\" username=\"TestRunner\"><message>Test message</message><properties><data name=\"{1}\" value=\"{2}\" /></properties></event>" + Environment.NewLine,
-#if NET_2_0 || MONO_2_0
+#if NET_2_0 || MONO_2_0 || MONO_3_5 || MONO_4_0
XmlConvert.ToString(DateTime.Today, XmlDateTimeSerializationMode.Local),
#else
XmlConvert.ToString(DateTime.Today),
@@ -303,7 +303,7 @@ namespace log4net.Tests.Layout
Assert.AreEqual(expected, stringAppender.GetString());
}
-#if NET_4_0
+#if NET_4_0 || MONO_4_0
[Test]
public void BracketsInStackTracesKeepLogWellFormed() {
XmlLayout layout = new XmlLayout();
@@ -350,8 +350,15 @@ namespace log4net.Tests.Layout
var startOfExceptionText = log.IndexOf("<exception>", StringComparison.InvariantCulture) + 11;
var endOfExceptionText = log.IndexOf("</exception>", StringComparison.InvariantCulture);
var sub = log.Substring(startOfExceptionText, endOfExceptionText - startOfExceptionText);
- StringAssert.DoesNotContain("<", sub);
- StringAssert.DoesNotContain(">", sub);
+ if (sub.StartsWith("<![CDATA["))
+ {
+ StringAssert.EndsWith("]]>", sub);
+ }
+ else
+ {
+ StringAssert.DoesNotContain("<", sub);
+ StringAssert.DoesNotContain(">", sub);
+ }
}
#endif
}
Modified: logging/log4net/branches/log4net-1.2.x/tests/src/Util/SystemInfoTest.cs
URL: http://svn.apache.org/viewvc/logging/log4net/branches/log4net-1.2.x/tests/src/Util/SystemInfoTest.cs?rev=1697216&r1=1697215&r2=1697216&view=diff
==============================================================================
--- logging/log4net/branches/log4net-1.2.x/tests/src/Util/SystemInfoTest.cs (original)
+++ logging/log4net/branches/log4net-1.2.x/tests/src/Util/SystemInfoTest.cs Sun Aug 23 16:33:07 2015
@@ -23,7 +23,7 @@ using log4net.Util;
using NUnit.Framework;
-#if NET_4_0
+#if NET_4_0 || MONO_4_0
using System.Linq.Expressions;
using System.Reflection;
#endif
@@ -37,7 +37,7 @@ namespace log4net.Tests.Util
public class SystemInfoTest
{
-#if NET_4_0
+#if NET_4_0 || MONO_4_0
/// <summary>
/// It's "does not throw not supported exception" NOT
/// "returns 'Dynamic Assembly' string for dynamic assemblies" by purpose.