You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by fr...@apache.org on 2025/12/07 21:08:39 UTC
(logging-log4net) branch Feature/RemoteSysLogAppender-NewLineHandling updated (fe2b7caa -> 5e18080f)
This is an automated email from the ASF dual-hosted git repository.
freeandnil pushed a change to branch Feature/RemoteSysLogAppender-NewLineHandling
in repository https://gitbox.apache.org/repos/asf/logging-log4net.git
from fe2b7caa added NewLineHandling to RemoteSyslogAppender - fixes #274
new 68ef2712 updated documentation for new newline handling #274
new 5e18080f update version to 3.3.0
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
doc/MailTemplate.Announce.txt | 8 +--
doc/MailTemplate.Result.txt | 4 +-
doc/MailTemplate.txt | 6 +-
package-lock.json | 4 +-
package.json | 4 +-
pom.xml | 2 +-
scripts/build-preview.ps1 | 2 +-
scripts/build-release.ps1 | 2 +-
.../{3.2.1 => 3.3.0}/.release-notes.adoc.ftl | 0
src/changelog/{3.2.1 => 3.3.0}/.release.xml | 4 +-
.../{3.2.1 => 3.3.0}/268-shorten-test-output.xml | 0
src/changelog/3.3.0/274-newline-handling.xml | 12 ++++
src/log4net/log4net.csproj | 6 +-
.../appenders/remotesyslogappender.adoc | 78 ++++++++++++++++------
14 files changed, 89 insertions(+), 43 deletions(-)
rename src/changelog/{3.2.1 => 3.3.0}/.release-notes.adoc.ftl (100%)
rename src/changelog/{3.2.1 => 3.3.0}/.release.xml (83%)
rename src/changelog/{3.2.1 => 3.3.0}/268-shorten-test-output.xml (100%)
create mode 100644 src/changelog/3.3.0/274-newline-handling.xml
(logging-log4net) 02/02: update version to 3.3.0
Posted by fr...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
freeandnil pushed a commit to branch Feature/RemoteSysLogAppender-NewLineHandling
in repository https://gitbox.apache.org/repos/asf/logging-log4net.git
commit 5e18080fd16729c80d4394f939ac7fbbeced789c
Author: Jan Friedrich <fr...@apache.org>
AuthorDate: Sun Dec 7 22:08:24 2025 +0100
update version to 3.3.0
---
doc/MailTemplate.Announce.txt | 8 ++++----
doc/MailTemplate.Result.txt | 4 ++--
doc/MailTemplate.txt | 6 +++---
package-lock.json | 4 ++--
package.json | 4 ++--
pom.xml | 2 +-
scripts/build-preview.ps1 | 2 +-
scripts/build-release.ps1 | 2 +-
src/changelog/{3.2.1 => 3.3.0}/.release-notes.adoc.ftl | 0
src/changelog/{3.2.1 => 3.3.0}/.release.xml | 4 ++--
src/changelog/{3.2.1 => 3.3.0}/268-shorten-test-output.xml | 0
src/changelog/{3.2.1 => 3.3.0}/274-newline-handling.xml | 0
src/log4net/log4net.csproj | 6 +++---
13 files changed, 21 insertions(+), 21 deletions(-)
diff --git a/doc/MailTemplate.Announce.txt b/doc/MailTemplate.Announce.txt
index 0de9c5c5..be253590 100644
--- a/doc/MailTemplate.Announce.txt
+++ b/doc/MailTemplate.Announce.txt
@@ -1,10 +1,10 @@
To: announce@apache.org, dev@logging.apache.org
-Subject: [ANNOUNCE] Apache log4net 3.2.1 released
+Subject: [ANNOUNCE] Apache log4net 3.3.0 released
Hi,
-the Apache log4net team is pleased to announce the 3.2.1 release.
+the Apache log4net team is pleased to announce the 3.3.0 release.
For further information (support, download, etc.) see
- https://logging.apache.org/log4net/release-notes.html
-- https://github.com/apache/logging-log4net/releases/tag/rel%2F3.2.1
-- https://www.nuget.org/packages/log4net/3.2.1
+- https://github.com/apache/logging-log4net/releases/tag/rel%2F3.3.0
+- https://www.nuget.org/packages/log4net/3.3.0
diff --git a/doc/MailTemplate.Result.txt b/doc/MailTemplate.Result.txt
index 38e094ed..56db87a1 100644
--- a/doc/MailTemplate.Result.txt
+++ b/doc/MailTemplate.Result.txt
@@ -1,5 +1,5 @@
To: dev@logging.apache.org
-Subject: [RESULT][VOTE] Release Apache Log4net 3.2.1
+Subject: [RESULT][VOTE] Release Apache Log4net 3.3.0
and here is my +1.
@@ -9,6 +9,6 @@ I will continue the release process.
Jan
---------------------------------------------------------------------------------------------------
-This is a vote to release the Apache Log4net 3.2.1.
+This is a vote to release the Apache Log4net 3.3.0.
...
diff --git a/doc/MailTemplate.txt b/doc/MailTemplate.txt
index fa50a629..5e0c0956 100644
--- a/doc/MailTemplate.txt
+++ b/doc/MailTemplate.txt
@@ -1,12 +1,12 @@
To: dev@logging.apache.org
-Subject: [VOTE] Release Apache Log4net 3.2.1
+Subject: [VOTE] Release Apache Log4net 3.3.0
-This is a vote to release the Apache Log4net 3.2.1.
+This is a vote to release the Apache Log4net 3.3.0.
Website: https://logging.staged.apache.org/log4net/release-notes.html
GitHub: https://github.com/apache/logging-log4net
Commit: <todo>
-Distribution: https://dist.apache.org/repos/dist/dev/logging/log4net/3.2.1
+Distribution: https://dist.apache.org/repos/dist/dev/logging/log4net/3.3.0
Signing key: 0x7D24496A230E29D6349A99EF583E491578F02D5D
Review kit: https://logging.staged.apache.org/log4net/release-review.html
diff --git a/package-lock.json b/package-lock.json
index 807f504d..c75eea65 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "log4net",
- "version": "3.2.1",
+ "version": "3.3.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "log4net",
- "version": "3.2.1",
+ "version": "3.3.0",
"license": "Apache-2.0",
"devDependencies": {
"@antora/cli": "^3.2.0-alpha.9",
diff --git a/package.json b/package.json
index a629673e..3e5eb511 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "log4net",
- "version": "3.2.1",
+ "version": "3.3.0",
"description": "Log4Net is a logging framework for .NET",
"repository": {
"type": "git",
@@ -17,4 +17,4 @@
"@antora/site-generator-default": "^3.2.0-alpha.9",
"@asciidoctor/tabs": "^1.0.0-beta.6"
}
-}
\ No newline at end of file
+}
diff --git a/pom.xml b/pom.xml
index ebc397f3..8f87a734 100644
--- a/pom.xml
+++ b/pom.xml
@@ -25,7 +25,7 @@
<packaging>pom</packaging>
<groupId>org.apache.logging.log4net</groupId>
<artifactId>apache-log4net</artifactId>
- <version>3.2.1</version>
+ <version>3.3.0</version>
<name>Apache log4net</name>
<description>Logging framework for Microsoft .NET Framework.</description>
<url>https://logging.apache.org/log4net</url>
diff --git a/scripts/build-preview.ps1 b/scripts/build-preview.ps1
index 3bbe40cc..2cef298a 100644
--- a/scripts/build-preview.ps1
+++ b/scripts/build-preview.ps1
@@ -1,5 +1,5 @@
param(
- $Version = '3.2.1',
+ $Version = '3.3.0',
$Preview = '1'
)
'building ...'
diff --git a/scripts/build-release.ps1 b/scripts/build-release.ps1
index 1103be26..fb2b4dea 100644
--- a/scripts/build-release.ps1
+++ b/scripts/build-release.ps1
@@ -1,5 +1,5 @@
param(
- $Version = '3.2.1'
+ $Version = '3.3.0'
)
Set-StrictMode -Version Latest
diff --git a/src/changelog/3.2.1/.release-notes.adoc.ftl b/src/changelog/3.3.0/.release-notes.adoc.ftl
similarity index 100%
rename from src/changelog/3.2.1/.release-notes.adoc.ftl
rename to src/changelog/3.3.0/.release-notes.adoc.ftl
diff --git a/src/changelog/3.2.1/.release.xml b/src/changelog/3.3.0/.release.xml
similarity index 83%
rename from src/changelog/3.2.1/.release.xml
rename to src/changelog/3.3.0/.release.xml
index 77b8f939..8bfd0e1a 100644
--- a/src/changelog/3.2.1/.release.xml
+++ b/src/changelog/3.3.0/.release.xml
@@ -2,5 +2,5 @@
<release xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://logging.apache.org/xml/ns"
xsi:schemaLocation="https://logging.apache.org/xml/ns https://logging.apache.org/xml/ns/log4j-changelog-0.xsd"
- date="2025-10-22"
- version="3.2.1"/>
\ No newline at end of file
+ date="2025-12-22"
+ version="3.3.0"/>
\ No newline at end of file
diff --git a/src/changelog/3.2.1/268-shorten-test-output.xml b/src/changelog/3.3.0/268-shorten-test-output.xml
similarity index 100%
rename from src/changelog/3.2.1/268-shorten-test-output.xml
rename to src/changelog/3.3.0/268-shorten-test-output.xml
diff --git a/src/changelog/3.2.1/274-newline-handling.xml b/src/changelog/3.3.0/274-newline-handling.xml
similarity index 100%
rename from src/changelog/3.2.1/274-newline-handling.xml
rename to src/changelog/3.3.0/274-newline-handling.xml
diff --git a/src/log4net/log4net.csproj b/src/log4net/log4net.csproj
index b5cad792..f18bbf22 100644
--- a/src/log4net/log4net.csproj
+++ b/src/log4net/log4net.csproj
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Version>3.2.1</Version>
+ <Version>3.3.0</Version>
<PackageId>log4net</PackageId>
<Product>Apache log4net</Product>
<Title>$(Product)</Title>
@@ -107,8 +107,8 @@ log4net is designed with two distinct goals in mind: speed and flexibility
<!-- "Workaround" for missing '.pdb'-Files from NuGet Packages -->
<!-- https://github.com/dotnet/sdk/issues/1458#issuecomment-420456386 -->
<ItemGroup>
- <ReferenceCopyLocalPaths Include="@(ReferenceCopyLocalPaths->'%(RootDir)%(Directory)%(Filename).pdb')" Condition="'%(ReferenceCopyLocalPaths.NuGetPackageId)' != '' and Exists('%(RootDir)%(Directory)%(Filename).pdb')" />
- <ReferenceCopyLocalPaths Include="@(ReferenceCopyLocalPaths->'%(RootDir)%(Directory)%(Filename).xml')" Condition="'%(ReferenceCopyLocalPaths.NuGetPackageId)' != '' and Exists('%(RootDir)%(Directory)%(Filename).xml')" />
+ <ReferenceCopyLocalPaths Include="@(ReferenceCopyLocalPaths->'%(RootDir)%(Directory)%(Filename).pdb')" Condition="'%(ReferenceCopyLocalPaths.NuGetPackageId)' != '' and Exists('%(RootDir)%(Directory)%(Filename).pdb')" />
+ <ReferenceCopyLocalPaths Include="@(ReferenceCopyLocalPaths->'%(RootDir)%(Directory)%(Filename).xml')" Condition="'%(ReferenceCopyLocalPaths.NuGetPackageId)' != '' and Exists('%(RootDir)%(Directory)%(Filename).xml')" />
</ItemGroup>
</Target>
</Project>
\ No newline at end of file
(logging-log4net) 01/02: updated documentation for new newline handling #274
Posted by fr...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
freeandnil pushed a commit to branch Feature/RemoteSysLogAppender-NewLineHandling
in repository https://gitbox.apache.org/repos/asf/logging-log4net.git
commit 68ef2712eee794df725068cf0a52146bb391a821
Author: Jan Friedrich <fr...@apache.org>
AuthorDate: Sun Dec 7 22:04:06 2025 +0100
updated documentation for new newline handling #274
---
src/changelog/3.2.1/274-newline-handling.xml | 12 ++++
.../appenders/remotesyslogappender.adoc | 78 ++++++++++++++++------
2 files changed, 68 insertions(+), 22 deletions(-)
diff --git a/src/changelog/3.2.1/274-newline-handling.xml b/src/changelog/3.2.1/274-newline-handling.xml
new file mode 100644
index 00000000..c8e7196f
--- /dev/null
+++ b/src/changelog/3.2.1/274-newline-handling.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<entry xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="https://logging.apache.org/xml/ns"
+ xsi:schemaLocation="https://logging.apache.org/xml/ns https://logging.apache.org/xml/ns/log4j-changelog-0.xsd"
+ type="changed">
+ <issue id="274" link="https://github.com/apache/logging-log4net/issue/274"/>
+ <issue id="276" link="https://github.com/apache/logging-log4net/pull/276"/>
+ <description format="asciidoc">
+https://logging.apache.org/log4net/manual/configuration/appenders/remotesyslogappender.html#newlinehandling[Newline handling] changed
+(by @FreeAndNil in https://github.com/apache/logging-log4net/pull/276[#276])
+ </description>
+</entry>
\ No newline at end of file
diff --git a/src/site/antora/modules/ROOT/pages/manual/configuration/appenders/remotesyslogappender.adoc b/src/site/antora/modules/ROOT/pages/manual/configuration/appenders/remotesyslogappender.adoc
index 141e8952..0a301b04 100644
--- a/src/site/antora/modules/ROOT/pages/manual/configuration/appenders/remotesyslogappender.adoc
+++ b/src/site/antora/modules/ROOT/pages/manual/configuration/appenders/remotesyslogappender.adoc
@@ -60,35 +60,69 @@ You can also specify:
[#newlinehandling]
== Newline handling
-If your log message contains multiple lines, it will be logged as multiple separate syslog entries instead of a single multiline message.
+Newline handling changed in version 3.3.0.
-This might lead to confusion when analyzing logs because related lines could appear interleaved with logs from other sources.
+Before version 3.3.0, newline characters (`\r` or `\n`) were always treated as line breaks.
+Messages containing newlines were therefore split into multiple syslog entries.
-Example:
+Starting with 3.3.0, newline handling is configurable through the `NewLineHandling` option.
+The new default is `Escape`.
+
+The available modes are:
+
+`Escape` (default since 3.3.0)::
+ Newlines are replaced with the escaped representations `\r` → "\\r" and `\n` → "\\n`.
+ The message is sent as a single syslog entry.
+
+`Split` (default before 3.3.0)::
+ The message is split at each newline into multiple syslog entries.
+ Combined sequences (\r\n or \n\r) count as a single break.
+ This matches the behaviour in versions before 3.3.0.
+
+`Keep`::
+ Newlines are preserved as-is in the message content.
+ Many syslog servers can process entries containing embedded newlines, but server support varies.
+
+=== Example: Escape
+
+Input:
[source,csharp]
-----
-try
-{
- throw new InvalidTimeZoneException();
-}
-catch (InvalidTimeZoneException e)
-{
- logger.Error(e, "setting daylight saving time failed")
-}
-----
+logger.Error("A\nB\r\nC");
-Output (with intermixed messages):
+Output (one syslog entry):
[source,log]
-----
-12/21/2024 14:07:41.508 [main] ERROR log4net.Tests - setting daylight saving time failed
-Exception of type 'System.InvalidTimeZoneException' was thrown.
-12/21/2024 14:07:41.511 [worker] WARN log4net.Tests - some unrelated log message
- at log4net.Tests.Appender.RemoteSyslogAppenderTest.LineBreakTest()
- at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
- at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
-----
+... ERROR ... - A\nB\rC
+
+=== Example: Split
+
+Input:
+
+[source,csharp]
+logger.Error("A\nB\r\nC");
+
+Output (three syslog entries, unrelated messages may interleave):
+
+[source,log]
+... ERROR ... - A
+... ERROR ... - B
+... INFO ... - something unrelated
+... ERROR ... - C
+
+=== Example: Keep
+
+Input:
+
+[source,csharp]
+logger.Error("A\nB\r\nC");
+
+Output (one syslog entry, with embedded newlines):
+
+[source,log]
+... ERROR ... - A
+B
+C
[#sizelimits]
== Size limits