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>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using BS.Shared.Core;
|
||||
using BeWo.ServerUtils.Core;
|
||||
using BS.Shared.Core;
|
||||
using System;
|
||||
using System.ServiceModel.Configuration;
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using BeWo.Data.Access;
|
||||
using BeWo.ServerUtils.Core;
|
||||
using BeWo.Service.Core;
|
||||
using BS.Shared.Core;
|
||||
using System;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using BeWo.Service.Core;
|
||||
using BeWo.ServerUtils.Core;
|
||||
using BeWo.Service.Core;
|
||||
using BS.Shared.Core;
|
||||
using DevExpress.CodeParser.Diagnostics;
|
||||
using log4net;
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
using log4net;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BS.Shared.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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -103,9 +103,6 @@
|
||||
<Reference Include="DevExpress.XtraReports.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
<Reference Include="DevExpress.XtraScheduler.v23.2.Core.Desktop, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
<Reference Include="DevExpress.XtraScheduler.v23.2.Core, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
|
||||
<Reference Include="log4net">
|
||||
<HintPath>..\Lib\log4net.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
@@ -152,7 +149,6 @@
|
||||
<Compile Include="Core\Facade\HttpClientFacade.cs" />
|
||||
<Compile Include="Core\Facade\JsonHttpClientFacade.cs" />
|
||||
<Compile Include="Core\JsonUtils.cs" />
|
||||
<Compile Include="Core\LoggerUtils.cs" />
|
||||
<Compile Include="Core\MailUtils.cs" />
|
||||
<Compile Include="Core\Rule\GkvRules.cs" />
|
||||
<Compile Include="Core\SecurityUtils.cs" />
|
||||
|
||||
Reference in New Issue
Block a user