Skip to content

Commit dfa3f13

Browse files
committed
Disable DiagnosticsLogger (EventLog no longer available on .NET 9+)
1 parent cb3fbd6 commit dfa3f13

3 files changed

Lines changed: 12 additions & 0 deletions

File tree

src/Castle.Core.Tests/Core.Tests/Logging/DiagnosticsLoggerTestCase.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
#if !NET9_0_OR_GREATER
16+
1517
namespace Castle.Core.Logging.Tests
1618
{
1719
using System;
@@ -101,3 +103,5 @@ public void SimpleUsage()
101103
}
102104
}
103105
}
106+
107+
#endif

src/Castle.Core/Core/Logging/DiagnosticsLogger.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
#if !NET9_0_OR_GREATER
16+
1517
namespace Castle.Core.Logging
1618
{
1719
using System;
@@ -147,3 +149,5 @@ private static EventLogEntryType TranslateLevel(LoggerLevel level)
147149
}
148150
}
149151
}
152+
153+
#endif

src/Castle.Core/Core/Logging/DiagnosticsLoggerFactory.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
#if !NET9_0_OR_GREATER
16+
1517
namespace Castle.Core.Logging
1618
{
1719
using System;
@@ -39,3 +41,5 @@ public override ILogger Create(string name, LoggerLevel level)
3941
}
4042
}
4143
}
44+
45+
#endif

0 commit comments

Comments
 (0)