diff --git a/Castle.Core.slnx b/Castle.Core.slnx
index fdf13f26fa..88133c4241 100644
--- a/Castle.Core.slnx
+++ b/Castle.Core.slnx
@@ -16,6 +16,7 @@
+
diff --git a/appveyor.yml b/appveyor.yml
index 867a666387..2e13ae50a3 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -78,6 +78,7 @@ for:
nuget push ".\build\Castle.Core-log4net.${env:APPVEYOR_BUILD_VERSION}.nupkg" -ApiKey $env:NUGET_API_KEY -Source https://api.nuget.org/v3/index.json
nuget push ".\build\Castle.Core-NLog.${env:APPVEYOR_BUILD_VERSION}.nupkg" -ApiKey $env:NUGET_API_KEY -Source https://api.nuget.org/v3/index.json
nuget push ".\build\Castle.Core-Serilog.${env:APPVEYOR_BUILD_VERSION}.nupkg" -ApiKey $env:NUGET_API_KEY -Source https://api.nuget.org/v3/index.json
+ nuget push ".\build\Castle.Core-DiagnosticsLogger.${env:APPVEYOR_BUILD_VERSION}.nupkg" -ApiKey $env:NUGET_API_KEY -Source https://api.nuget.org/v3/index.json
}
# upload packages to AppVeyor
diff --git a/ref/Castle.Core-net462.cs b/ref/Castle.Core-net462.cs
index e488f8387b..72fadd5455 100644
--- a/ref/Castle.Core-net462.cs
+++ b/ref/Castle.Core-net462.cs
@@ -1993,25 +1993,6 @@ public ConsoleLogger(string name, Castle.Core.Logging.LoggerLevel logLevel) { }
public override Castle.Core.Logging.ILogger CreateChildLogger(string loggerName) { }
protected override void Log(Castle.Core.Logging.LoggerLevel loggerLevel, string loggerName, string message, System.Exception exception) { }
}
- [System.Serializable]
- public class DiagnosticsLogger : Castle.Core.Logging.LevelFilteredLogger, System.IDisposable
- {
- public DiagnosticsLogger(string logName) { }
- public DiagnosticsLogger(string logName, string source) { }
- public DiagnosticsLogger(string logName, string machineName, string source) { }
- public override Castle.Core.Logging.ILogger CreateChildLogger(string loggerName) { }
- public void Dispose() { }
- protected virtual void Dispose(bool disposing) { }
- protected override void Finalize() { }
- protected override void Log(Castle.Core.Logging.LoggerLevel loggerLevel, string loggerName, string message, System.Exception exception) { }
- }
- [System.Serializable]
- public class DiagnosticsLoggerFactory : Castle.Core.Logging.AbstractLoggerFactory
- {
- public DiagnosticsLoggerFactory() { }
- public override Castle.Core.Logging.ILogger Create(string name) { }
- public override Castle.Core.Logging.ILogger Create(string name, Castle.Core.Logging.LoggerLevel level) { }
- }
public interface IContextProperties
{
object this[string key] { get; set; }
diff --git a/ref/Castle.Core-net8.0.cs b/ref/Castle.Core-net8.0.cs
index afdf46b837..a54cd9e4ee 100644
--- a/ref/Castle.Core-net8.0.cs
+++ b/ref/Castle.Core-net8.0.cs
@@ -1984,25 +1984,6 @@ public ConsoleLogger(string name, Castle.Core.Logging.LoggerLevel logLevel) { }
public override Castle.Core.Logging.ILogger CreateChildLogger(string loggerName) { }
protected override void Log(Castle.Core.Logging.LoggerLevel loggerLevel, string loggerName, string message, System.Exception exception) { }
}
- [System.Runtime.Versioning.SupportedOSPlatform("windows")]
- public class DiagnosticsLogger : Castle.Core.Logging.LevelFilteredLogger, System.IDisposable
- {
- public DiagnosticsLogger(string logName) { }
- public DiagnosticsLogger(string logName, string source) { }
- public DiagnosticsLogger(string logName, string machineName, string source) { }
- public override Castle.Core.Logging.ILogger CreateChildLogger(string loggerName) { }
- public void Dispose() { }
- protected virtual void Dispose(bool disposing) { }
- protected override void Finalize() { }
- protected override void Log(Castle.Core.Logging.LoggerLevel loggerLevel, string loggerName, string message, System.Exception exception) { }
- }
- [System.Runtime.Versioning.SupportedOSPlatform("windows")]
- public class DiagnosticsLoggerFactory : Castle.Core.Logging.AbstractLoggerFactory
- {
- public DiagnosticsLoggerFactory() { }
- public override Castle.Core.Logging.ILogger Create(string name) { }
- public override Castle.Core.Logging.ILogger Create(string name, Castle.Core.Logging.LoggerLevel level) { }
- }
public interface IContextProperties
{
object this[string key] { get; set; }
diff --git a/ref/Castle.Core-netstandard2.0.cs b/ref/Castle.Core-netstandard2.0.cs
index f47626cc6a..7deef20e0c 100644
--- a/ref/Castle.Core-netstandard2.0.cs
+++ b/ref/Castle.Core-netstandard2.0.cs
@@ -1984,23 +1984,6 @@ public ConsoleLogger(string name, Castle.Core.Logging.LoggerLevel logLevel) { }
public override Castle.Core.Logging.ILogger CreateChildLogger(string loggerName) { }
protected override void Log(Castle.Core.Logging.LoggerLevel loggerLevel, string loggerName, string message, System.Exception exception) { }
}
- public class DiagnosticsLogger : Castle.Core.Logging.LevelFilteredLogger, System.IDisposable
- {
- public DiagnosticsLogger(string logName) { }
- public DiagnosticsLogger(string logName, string source) { }
- public DiagnosticsLogger(string logName, string machineName, string source) { }
- public override Castle.Core.Logging.ILogger CreateChildLogger(string loggerName) { }
- public void Dispose() { }
- protected virtual void Dispose(bool disposing) { }
- protected override void Finalize() { }
- protected override void Log(Castle.Core.Logging.LoggerLevel loggerLevel, string loggerName, string message, System.Exception exception) { }
- }
- public class DiagnosticsLoggerFactory : Castle.Core.Logging.AbstractLoggerFactory
- {
- public DiagnosticsLoggerFactory() { }
- public override Castle.Core.Logging.ILogger Create(string name) { }
- public override Castle.Core.Logging.ILogger Create(string name, Castle.Core.Logging.LoggerLevel level) { }
- }
public interface IContextProperties
{
object this[string key] { get; set; }
diff --git a/ref/Castle.Services.Logging.EventLogIntegration-net462.cs b/ref/Castle.Services.Logging.EventLogIntegration-net462.cs
new file mode 100644
index 0000000000..2fe30146fe
--- /dev/null
+++ b/ref/Castle.Services.Logging.EventLogIntegration-net462.cs
@@ -0,0 +1,24 @@
+[assembly: System.Reflection.AssemblyMetadata("RepositoryUrl", "https://github.com/castleproject/Core")]
+[assembly: System.Runtime.Versioning.TargetFramework(".NETFramework,Version=v4.6.2", FrameworkDisplayName=".NET Framework 4.6.2")]
+namespace Castle.Services.Logging.EventLogIntegration
+{
+ [System.Serializable]
+ public class DiagnosticsLogger : Castle.Core.Logging.LevelFilteredLogger, System.IDisposable
+ {
+ public DiagnosticsLogger(string logName) { }
+ public DiagnosticsLogger(string logName, string source) { }
+ public DiagnosticsLogger(string logName, string machineName, string source) { }
+ public override Castle.Core.Logging.ILogger CreateChildLogger(string loggerName) { }
+ public void Dispose() { }
+ protected virtual void Dispose(bool disposing) { }
+ protected override void Finalize() { }
+ protected override void Log(Castle.Core.Logging.LoggerLevel loggerLevel, string loggerName, string message, System.Exception exception) { }
+ }
+ [System.Serializable]
+ public class DiagnosticsLoggerFactory : Castle.Core.Logging.AbstractLoggerFactory
+ {
+ public DiagnosticsLoggerFactory() { }
+ public override Castle.Core.Logging.ILogger Create(string name) { }
+ public override Castle.Core.Logging.ILogger Create(string name, Castle.Core.Logging.LoggerLevel level) { }
+ }
+}
\ No newline at end of file
diff --git a/ref/Castle.Services.Logging.EventLogIntegration-net8.0.cs b/ref/Castle.Services.Logging.EventLogIntegration-net8.0.cs
new file mode 100644
index 0000000000..33b1e26dba
--- /dev/null
+++ b/ref/Castle.Services.Logging.EventLogIntegration-net8.0.cs
@@ -0,0 +1,24 @@
+[assembly: System.Reflection.AssemblyMetadata("RepositoryUrl", "https://github.com/castleproject/Core")]
+[assembly: System.Runtime.Versioning.TargetFramework(".NETCoreApp,Version=v8.0", FrameworkDisplayName=".NET 8.0")]
+namespace Castle.Services.Logging.EventLogIntegration
+{
+ [System.Runtime.Versioning.SupportedOSPlatform("windows")]
+ public class DiagnosticsLogger : Castle.Core.Logging.LevelFilteredLogger, System.IDisposable
+ {
+ public DiagnosticsLogger(string logName) { }
+ public DiagnosticsLogger(string logName, string source) { }
+ public DiagnosticsLogger(string logName, string machineName, string source) { }
+ public override Castle.Core.Logging.ILogger CreateChildLogger(string loggerName) { }
+ public void Dispose() { }
+ protected virtual void Dispose(bool disposing) { }
+ protected override void Finalize() { }
+ protected override void Log(Castle.Core.Logging.LoggerLevel loggerLevel, string loggerName, string message, System.Exception exception) { }
+ }
+ [System.Runtime.Versioning.SupportedOSPlatform("windows")]
+ public class DiagnosticsLoggerFactory : Castle.Core.Logging.AbstractLoggerFactory
+ {
+ public DiagnosticsLoggerFactory() { }
+ public override Castle.Core.Logging.ILogger Create(string name) { }
+ public override Castle.Core.Logging.ILogger Create(string name, Castle.Core.Logging.LoggerLevel level) { }
+ }
+}
\ No newline at end of file
diff --git a/ref/Castle.Services.Logging.EventLogIntegration-netstandard2.0.cs b/ref/Castle.Services.Logging.EventLogIntegration-netstandard2.0.cs
new file mode 100644
index 0000000000..1b802db710
--- /dev/null
+++ b/ref/Castle.Services.Logging.EventLogIntegration-netstandard2.0.cs
@@ -0,0 +1,22 @@
+[assembly: System.Reflection.AssemblyMetadata("RepositoryUrl", "https://github.com/castleproject/Core")]
+[assembly: System.Runtime.Versioning.TargetFramework(".NETStandard,Version=v2.0", FrameworkDisplayName=".NET Standard 2.0")]
+namespace Castle.Services.Logging.EventLogIntegration
+{
+ public class DiagnosticsLogger : Castle.Core.Logging.LevelFilteredLogger, System.IDisposable
+ {
+ public DiagnosticsLogger(string logName) { }
+ public DiagnosticsLogger(string logName, string source) { }
+ public DiagnosticsLogger(string logName, string machineName, string source) { }
+ public override Castle.Core.Logging.ILogger CreateChildLogger(string loggerName) { }
+ public void Dispose() { }
+ protected virtual void Dispose(bool disposing) { }
+ protected override void Finalize() { }
+ protected override void Log(Castle.Core.Logging.LoggerLevel loggerLevel, string loggerName, string message, System.Exception exception) { }
+ }
+ public class DiagnosticsLoggerFactory : Castle.Core.Logging.AbstractLoggerFactory
+ {
+ public DiagnosticsLoggerFactory() { }
+ public override Castle.Core.Logging.ILogger Create(string name) { }
+ public override Castle.Core.Logging.ILogger Create(string name, Castle.Core.Logging.LoggerLevel level) { }
+ }
+}
\ No newline at end of file
diff --git a/src/Castle.Core.Tests.WeakNamed/Castle.Core.Tests.WeakNamed.csproj b/src/Castle.Core.Tests.WeakNamed/Castle.Core.Tests.WeakNamed.csproj
index 6b4a9f71c4..855b51b825 100644
--- a/src/Castle.Core.Tests.WeakNamed/Castle.Core.Tests.WeakNamed.csproj
+++ b/src/Castle.Core.Tests.WeakNamed/Castle.Core.Tests.WeakNamed.csproj
@@ -1,4 +1,4 @@
-
+
@@ -25,6 +25,7 @@
+
diff --git a/src/Castle.Core.Tests/Castle.Core.Tests.csproj b/src/Castle.Core.Tests/Castle.Core.Tests.csproj
index 7fbc5856ad..66e9f7d12d 100644
--- a/src/Castle.Core.Tests/Castle.Core.Tests.csproj
+++ b/src/Castle.Core.Tests/Castle.Core.Tests.csproj
@@ -50,12 +50,14 @@
+
-
-
+
+
+
diff --git a/src/Castle.Core.Tests/PublicApiTestCase.cs b/src/Castle.Core.Tests/PublicApiTestCase.cs
index bc64f412b9..96536c43c6 100644
--- a/src/Castle.Core.Tests/PublicApiTestCase.cs
+++ b/src/Castle.Core.Tests/PublicApiTestCase.cs
@@ -40,6 +40,7 @@ public class PublicApiTestCase
"Castle.Services.Logging.log4netIntegration",
"Castle.Services.Logging.NLogIntegration",
"Castle.Services.Logging.SerilogIntegration",
+ "Castle.Services.Logging.EventLogIntegration",
};
[Test]
diff --git a/src/Castle.Core.Tests/Core.Tests/Logging/DiagnosticsLoggerTestCase.cs b/src/Castle.Core.Tests/Services.Logging.Tests/DiagnosticLogger/DiagnosticsLoggerTestCase.cs
similarity index 95%
rename from src/Castle.Core.Tests/Core.Tests/Logging/DiagnosticsLoggerTestCase.cs
rename to src/Castle.Core.Tests/Services.Logging.Tests/DiagnosticLogger/DiagnosticsLoggerTestCase.cs
index 029c901be2..8f0feb3e4d 100644
--- a/src/Castle.Core.Tests/Core.Tests/Logging/DiagnosticsLoggerTestCase.cs
+++ b/src/Castle.Core.Tests/Services.Logging.Tests/DiagnosticLogger/DiagnosticsLoggerTestCase.cs
@@ -1,4 +1,4 @@
-// Copyright 2004-2022 Castle Project - http://www.castleproject.org/
+// Copyright 2004-2025 Castle Project - http://www.castleproject.org/
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-namespace Castle.Core.Logging.Tests
+namespace Castle.Services.Logging.EventLogIntegration.Tests
{
using System;
using System.Diagnostics;
diff --git a/src/Castle.Core/Castle.Core.csproj b/src/Castle.Core/Castle.Core.csproj
index fa705deaff..da2b196473 100644
--- a/src/Castle.Core/Castle.Core.csproj
+++ b/src/Castle.Core/Castle.Core.csproj
@@ -34,11 +34,6 @@
-
-
-
-
-
diff --git a/src/Castle.Services.Logging.EventLogIntegration/Castle.Services.Logging.EventLogIntegration.csproj b/src/Castle.Services.Logging.EventLogIntegration/Castle.Services.Logging.EventLogIntegration.csproj
new file mode 100644
index 0000000000..a9b062f850
--- /dev/null
+++ b/src/Castle.Services.Logging.EventLogIntegration/Castle.Services.Logging.EventLogIntegration.csproj
@@ -0,0 +1,31 @@
+
+
+
+
+
+ net8.0;net462;netstandard2.0
+
+
+
+ Castle.Core-DiagnosticsLogger
+ True
+ ../../build/
+ Castle.Services.Logging.EventLogIntegration
+ Castle.Services.Logging.EventLogIntegration
+ Castle Windows EventLog integration
+ Castle Services DiagnosticsLogger for Windows EventLog
+ ..\..\buildscripts\CastleKey.snk
+ True
+ true
+ castle logging eventlog
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Castle.Core/Core/Logging/DiagnosticsLogger.cs b/src/Castle.Services.Logging.EventLogIntegration/DiagnosticsLogger.cs
similarity index 96%
rename from src/Castle.Core/Core/Logging/DiagnosticsLogger.cs
rename to src/Castle.Services.Logging.EventLogIntegration/DiagnosticsLogger.cs
index bf591efc33..7ec9ebfe40 100644
--- a/src/Castle.Core/Core/Logging/DiagnosticsLogger.cs
+++ b/src/Castle.Services.Logging.EventLogIntegration/DiagnosticsLogger.cs
@@ -1,4 +1,4 @@
-// Copyright 2004-2022 Castle Project - http://www.castleproject.org/
+// Copyright 2004-2025 Castle Project - http://www.castleproject.org/
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -12,11 +12,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-namespace Castle.Core.Logging
+namespace Castle.Services.Logging.EventLogIntegration
{
using System;
using System.Diagnostics;
using System.Globalization;
+ using Castle.Core.Logging;
///
/// The Logger using standard Diagnostics namespace.
diff --git a/src/Castle.Core/Core/Logging/DiagnosticsLoggerFactory.cs b/src/Castle.Services.Logging.EventLogIntegration/DiagnosticsLoggerFactory.cs
similarity index 88%
rename from src/Castle.Core/Core/Logging/DiagnosticsLoggerFactory.cs
rename to src/Castle.Services.Logging.EventLogIntegration/DiagnosticsLoggerFactory.cs
index 97ee575e03..178b61dce8 100644
--- a/src/Castle.Core/Core/Logging/DiagnosticsLoggerFactory.cs
+++ b/src/Castle.Services.Logging.EventLogIntegration/DiagnosticsLoggerFactory.cs
@@ -1,4 +1,4 @@
-// Copyright 2004-2022 Castle Project - http://www.castleproject.org/
+// Copyright 2004-2025 Castle Project - http://www.castleproject.org/
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -12,9 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-namespace Castle.Core.Logging
+namespace Castle.Services.Logging.EventLogIntegration
{
using System;
+ using Castle.Core.Logging;
#if FEATURE_SERIALIZATION
[Serializable]