Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Castle.Core.slnx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<File Path=".github/workflows/build.yml" />
</Folder>
<Folder Name="/Castle Services/">
<Project Path="src/Castle.Services.Logging.EventLogIntegration/Castle.Services.Logging.EventLogIntegration.csproj" />
<Project Path="src/Castle.Services.Logging.log4netIntegration/Castle.Services.Logging.log4netIntegration.csproj" />
<Project Path="src/Castle.Services.Logging.NLogIntegration/Castle.Services.Logging.NLogIntegration.csproj" />
<Project Path="src/Castle.Services.Logging.SerilogIntegration/Castle.Services.Logging.SerilogIntegration.csproj" />
Expand Down
1 change: 1 addition & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
19 changes: 0 additions & 19 deletions ref/Castle.Core-net462.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand Down
19 changes: 0 additions & 19 deletions ref/Castle.Core-net8.0.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand Down
17 changes: 0 additions & 17 deletions ref/Castle.Core-netstandard2.0.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand Down
24 changes: 24 additions & 0 deletions ref/Castle.Services.Logging.EventLogIntegration-net462.cs
Original file line number Diff line number Diff line change
@@ -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) { }
}
}
24 changes: 24 additions & 0 deletions ref/Castle.Services.Logging.EventLogIntegration-net8.0.cs
Original file line number Diff line number Diff line change
@@ -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) { }
}
}
22 changes: 22 additions & 0 deletions ref/Castle.Services.Logging.EventLogIntegration-netstandard2.0.cs
Original file line number Diff line number Diff line change
@@ -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) { }
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<Import Project="..\..\buildscripts\common.props"></Import>

Expand All @@ -25,6 +25,7 @@
<ItemGroup>
<ProjectReference Include="..\Castle.Core\Castle.Core.csproj" />
<ProjectReference Include="..\Castle.Core.Tests\Castle.Core.Tests.csproj" />
<ProjectReference Include="..\Castle.Services.Logging.EventLogIntegration\Castle.Services.Logging.EventLogIntegration.csproj" />
<ProjectReference Include="..\Castle.Services.Logging.log4netIntegration\Castle.Services.Logging.log4netIntegration.csproj" />
<ProjectReference Include="..\Castle.Services.Logging.NLogIntegration\Castle.Services.Logging.NLogIntegration.csproj" />
<ProjectReference Include="..\Castle.Services.Logging.SerilogIntegration\Castle.Services.Logging.SerilogIntegration.csproj" />
Expand Down
6 changes: 4 additions & 2 deletions src/Castle.Core.Tests/Castle.Core.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,14 @@

<ItemGroup>
<ProjectReference Include="..\Castle.Core\Castle.Core.csproj" />
<ProjectReference Include="..\Castle.Services.Logging.EventLogIntegration\Castle.Services.Logging.EventLogIntegration.csproj" />
<ProjectReference Include="..\Castle.Services.Logging.log4netIntegration\Castle.Services.Logging.log4netIntegration.csproj" />
<ProjectReference Include="..\Castle.Services.Logging.NLogIntegration\Castle.Services.Logging.NLogIntegration.csproj" />
<ProjectReference Include="..\Castle.Services.Logging.SerilogIntegration\Castle.Services.Logging.SerilogIntegration.csproj" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)'=='net8.0'">

<ItemGroup Condition=" '$(TargetFrameworkIdentifier)' != '.NETFramework' ">
<PackageReference Include="System.Diagnostics.EventLog" Version="8.0.2" />
<PackageReference Include="System.Security.Permissions" Version="8.0.0" />
<PackageReference Include="PublicApiGenerator" Version="11.4.6" />
</ItemGroup>
Expand Down
1 change: 1 addition & 0 deletions src/Castle.Core.Tests/PublicApiTestCase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ public class PublicApiTestCase
"Castle.Services.Logging.log4netIntegration",
"Castle.Services.Logging.NLogIntegration",
"Castle.Services.Logging.SerilogIntegration",
"Castle.Services.Logging.EventLogIntegration",
};

[Test]
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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;
Expand Down
5 changes: 0 additions & 5 deletions src/Castle.Core/Castle.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,6 @@

<ItemGroup Condition="'$(TargetFramework)'=='netstandard2.0'">
<PackageReference Include="System.Reflection.Emit" Version="4.7.0" />
<PackageReference Include="System.Diagnostics.EventLog" Version="8.0.2" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)'=='net8.0'">
<PackageReference Include="System.Diagnostics.EventLog" Version="8.0.2" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<Project Sdk="Microsoft.NET.Sdk">

<Import Project="..\..\buildscripts\common.props"></Import>

<PropertyGroup>
<TargetFrameworks>net8.0;net462;netstandard2.0</TargetFrameworks>
</PropertyGroup>

<PropertyGroup>
<PackageId>Castle.Core-DiagnosticsLogger</PackageId>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<PackageOutputPath>../../build/</PackageOutputPath>
<AssemblyName>Castle.Services.Logging.EventLogIntegration</AssemblyName>
<RootNamespace>Castle.Services.Logging.EventLogIntegration</RootNamespace>
<AssemblyTitle>Castle Windows EventLog integration</AssemblyTitle>
<Description>Castle Services DiagnosticsLogger for Windows EventLog</Description>
<AssemblyOriginatorKeyFile>..\..\buildscripts\CastleKey.snk</AssemblyOriginatorKeyFile>
<SignAssembly>True</SignAssembly>
<PublicSign Condition="'$(OS)'=='Unix'">true</PublicSign>
<PackageTags>castle logging eventlog</PackageTags>
</PropertyGroup>

<ItemGroup Condition=" '$(TargetFrameworkIdentifier)' != '.NETFramework' ">
<PackageReference Include="System.Diagnostics.EventLog" Version="8.0.2" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Castle.Core\Castle.Core.csproj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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;

/// <summary>
/// The Logger using standard Diagnostics namespace.
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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]
Expand Down
Loading