LoggerUtils von Shared nach ServerUtils umgezogen (wegen Versionskonflikten von Log4Net)

This commit is contained in:
2026-06-25 01:46:21 +02:00
parent 60d993a426
commit 166de951b6
10 changed files with 41 additions and 40 deletions

View File

@@ -12,6 +12,7 @@ using System.ComponentModel.Design;
using System.Runtime.Remoting.Messaging;
using log4net;
using BS.Shared.Core;
using BeWo.ServerUtils.Core;
namespace AICore.Facade
{

View File

@@ -13,6 +13,7 @@ using BS.Shared.Logger;
using log4net;
using System.Runtime.CompilerServices;
using BS.Shared.Core;
using BeWo.ServerUtils.Core;
namespace AICore.Facade.LLM
{

View File

@@ -1,4 +1,5 @@
using BS.Shared.Core;
using BeWo.ServerUtils.Core;
using BS.Shared.Core;
using BS.Shared.DataContracts;
using BS.Shared.Exceptions;
using BS.Shared.Interface;

View File

@@ -0,0 +1,30 @@
using log4net;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BeWo.ServerUtils.Core
{
public static class LoggerUtils
{
private static bool _LoggerInit = false;
public static void InitLogger()
{
if (_LoggerInit) return;
log4net.Config.XmlConfigurator.Configure();
_LoggerInit = true;
}
public static ILog GetLogger(Type declaringType)
{
InitLogger();
return log4net.LogManager.GetLogger(declaringType);
}
}
}

View File

@@ -89,6 +89,7 @@
<ItemGroup>
<Compile Include="ApiFacade\HttpClientFacade.cs" />
<Compile Include="ApiFacade\JsonHttpClientFacade.cs" />
<Compile Include="Core\LoggerUtils.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
@@ -98,9 +99,7 @@
<None Include="app.config" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<Folder Include="Core\" />
</ItemGroup>
<ItemGroup />
<ItemGroup>
<ProjectReference Include="..\..\..\Shared\Shared.csproj">
<Project>{2f50b83d-a3f0-4ec4-979a-3f9b7e3d8ed4}</Project>