LoggerUtils von Shared nach ServerUtils umgezogen (wegen Versionskonflikten von Log4Net)
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
|
||||
30
Server/Components/ServerUtils/Core/LoggerUtils.cs
Normal file
30
Server/Components/ServerUtils/Core/LoggerUtils.cs
Normal 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user