[성현모] SystemX.Core.dll 참조, logxnet config 추가

This commit is contained in:
SHM
2026-03-09 10:31:01 +09:00
parent cc5c6d572b
commit 0b476f4072
11 changed files with 137 additions and 1 deletions

View File

@ -0,0 +1,79 @@
{
"ConsoleEnable": true,
"FileOutputEnable": true,
"TimeStampEnable": true,
"ThreadIdEnable": true,
"AutoRemoveEnable": true,
"OutputFilePath": "/log",
"TimeStampForamt": "yyyy-MM-dd HH:mm:ss.fff",
"AutoRemoveIntervalDay": 10,
"LogLevel": "Debug",
"LogDefines": [
{
"LogLevel": "DEFAULT",
"LogLabel": "default",
"ForeColorRGB": "#fbebd2"
},
{
"LogLevel": "Debug",
"LogLabel": "Debug",
"ForeColorRGB": "#148CFF"
},
{
"LogLevel": "Debug",
"LogLabel": "Db",
"ForeColorRGB": "#46BEFF"
},
{
"LogLevel": "Debug",
"LogLabel": "HTTP",
"ForeColorRGB": "#6E6EFF"
},
{
"LogLevel": "Debug",
"LogLabel": "CONTROLLER",
"ForeColorRGB": "#B4B4FF"
},
{
"LogLevel": "Debug",
"LogLabel": "SOCKET",
"ForeColorRGB": "#5A78AF"
},
{
"LogLevel": "Information",
"LogLabel": "Information",
"ForeColorRGB": "22;198;12"
},
{
"LogLevel": "Information",
"LogLabel": "INFO",
"ForeColorRGB": "#419B4F"
},
{
"LogLevel": "Warning",
"LogLabel": "Warning",
"ForeColorRGB": "#E1B002"
},
{
"LogLevel": "Error",
"LogLabel": "Error",
"ForeColorRGB": "#ff0000"
},
{
"LogLevel": "Error",
"LogLabel": "Exception",
"ForeColorRGB": "255;123;123"
},
{
"LogLevel": "Critical",
"LogLabel": "Critical",
"ForeColorRGB": "#a70000"
},
{
"LogLevel": "Critical",
"LogLabel": "Fatal",
"ForeColorRGB": "#FF6347"
}
]
}

View File

@ -8,6 +8,18 @@ namespace eCIAv2.WindowsApp
[STAThread]
static void Main()
{
string configDir = @$"{Application.StartupPath}Config";
//raed log4net configs
if (LogXnet.ReadConfig(@$"{configDir}/LogXnetConfig.json") == true)
{
LogXnet.WriteLine("LogXnet Init Success");
}
else
{
Console.WriteLine("LogXnet Init Failed");
return;
}
// To customize application configuration such as set high DPI settings or default font,
// see https://aka.ms/applicationconfiguration.
ApplicationConfiguration.Initialize();

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0-windows</TargetFramework>
<Nullable>enable</Nullable>
<UseWindowsForms>true</UseWindowsForms>
@ -12,4 +12,34 @@
<ProjectReference Include="..\eCIAv2.Library\eCIAv2.Library.csproj" />
</ItemGroup>
<ItemGroup>
<Reference Include="Microsoft.Extensions.DependencyInjection">
<HintPath>..\DLL\Microsoft.Extensions.DependencyInjection.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Extensions.DependencyInjection.Abstractions">
<HintPath>..\DLL\Microsoft.Extensions.DependencyInjection.Abstractions.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Extensions.Logging">
<HintPath>..\DLL\Microsoft.Extensions.Logging.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Extensions.Logging.Abstractions">
<HintPath>..\DLL\Microsoft.Extensions.Logging.Abstractions.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Extensions.Options">
<HintPath>..\DLL\Microsoft.Extensions.Options.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json">
<HintPath>..\DLL\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="SystemX.Core">
<HintPath>..\DLL\SystemX.Core.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<None Update="Config\LogXnetConfig.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
</Project>