Merge pull request #98 from apache/dependabot/npm_and_yarn/qs-6.5.3
⬆️ Bump qs from 6.5.2 to 6.5.3
diff --git a/examples/net/2.0/Remoting/RemotingServer/cs/src/App.config b/examples/net/2.0/Remoting/RemotingServer/cs/src/App.config
index 52b699d..9a8b391 100644
--- a/examples/net/2.0/Remoting/RemotingServer/cs/src/App.config
+++ b/examples/net/2.0/Remoting/RemotingServer/cs/src/App.config
@@ -34,7 +34,7 @@
</appender>
<appender name="LogFileAppender" type="log4net.Appender.FileAppender">
<file value="log-file.txt" />
- <sppendToFile value="true" />
+ <appendToFile value="true" />
<layout type="log4net.Layout.PatternLayout">
<header value="FILE HEADER " />
<footer value="FILE FOOTER " />
diff --git a/package-lock.json b/package-lock.json
index ebc6900..a4169ba 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1473,9 +1473,9 @@
}
},
"node_modules/decode-uri-component": {
- "version": "0.2.0",
- "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz",
- "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=",
+ "version": "0.2.2",
+ "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.2.tgz",
+ "integrity": "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==",
"dev": true,
"engines": {
"node": ">=0.10"
@@ -8254,9 +8254,9 @@
"dev": true
},
"decode-uri-component": {
- "version": "0.2.0",
- "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz",
- "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=",
+ "version": "0.2.2",
+ "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.2.tgz",
+ "integrity": "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==",
"dev": true
},
"default-compare": {
diff --git a/pom.xml b/pom.xml
index 86918c5..f1787c1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -116,7 +116,7 @@
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant</artifactId>
- <version>1.9.4</version>
+ <version>1.10.11</version>
</dependency>
</dependencies>
</plugin>
diff --git a/src/log4net/Util/LogicalThreadContextStack.cs b/src/log4net/Util/LogicalThreadContextStack.cs
index 005b6c1..dbad39a 100644
--- a/src/log4net/Util/LogicalThreadContextStack.cs
+++ b/src/log4net/Util/LogicalThreadContextStack.cs
@@ -26,16 +26,16 @@
namespace log4net.Util
{
- /// <summary>
+ /// <summary>
/// Delegate type used for LogicalThreadContextStack's callbacks.
/// </summary>
- #if NET_2_0 || MONO_2_0 || NETSTANDARD
+ #if NET_2_0 || MONO_2_0 || NETSTANDARD
public delegate void TwoArgAction<T1, T2>(T1 t1, T2 t2);
- #else
+ #else
public delegate void TwoArgAction(string t1, LogicalThreadContextStack t2);
- #endif
+ #endif
- /// <summary>
+ /// <summary>
/// Implementation of Stack for the <see cref="log4net.LogicalThreadContext"/>
/// </summary>
/// <remarks>
@@ -65,7 +65,7 @@
/// </summary>
#if NET_2_0 || MONO_2_0 || NETSTANDARD
private TwoArgAction<string, LogicalThreadContextStack> m_registerNew;
- #else
+ #else
private TwoArgAction m_registerNew;
#endif
@@ -83,7 +83,7 @@
/// </remarks>
#if NET_2_0 || MONO_2_0 || NETSTANDARD
internal LogicalThreadContextStack(string propertyKey, TwoArgAction<string, LogicalThreadContextStack> registerNew)
- #else
+ #else
internal LogicalThreadContextStack(string propertyKey, TwoArgAction registerNew)
#endif
{
@@ -198,6 +198,26 @@
return new AutoPopStackFrame(contextStack, stack.Count - 1);
}
+ /// <summary>
+ /// Returns the top context from this stack.
+ /// </summary>
+ /// <returns>The message in the context from the top of this stack.</returns>
+ /// <remarks>
+ /// <para>
+ /// Returns the top context from this stack. If this stack is empty then an
+ /// empty string (not <see langword="null"/>) is returned.
+ /// </para>
+ /// </remarks>
+ public string Peek()
+ {
+ Stack stack = m_stack;
+ if (stack.Count > 0)
+ {
+ return ((StackFrame)stack.Peek()).Message;
+ }
+ return "";
+ }
+
#endregion Public Methods
#region Internal Methods
diff --git a/src/log4net/Util/ThreadContextStack.cs b/src/log4net/Util/ThreadContextStack.cs
index d723dca..53d6fba 100644
--- a/src/log4net/Util/ThreadContextStack.cs
+++ b/src/log4net/Util/ThreadContextStack.cs
@@ -159,6 +159,26 @@
return new AutoPopStackFrame(stack, stack.Count - 1);
}
+ /// <summary>
+ /// Returns the top context from this stack.
+ /// </summary>
+ /// <returns>The message in the context from the top of this stack.</returns>
+ /// <remarks>
+ /// <para>
+ /// Returns the top context from this stack. If this stack is empty then an
+ /// empty string (not <see langword="null"/>) is returned.
+ /// </para>
+ /// </remarks>
+ public string Peek()
+ {
+ Stack stack = m_stack;
+ if (stack.Count > 0)
+ {
+ return ((StackFrame)stack.Peek()).Message;
+ }
+ return "";
+ }
+
#endregion Public Methods
#region Internal Methods