diff --git a/src/2-api/HuanMeng.MiaoYu.WebPayApi/Dockerfile b/src/2-api/HuanMeng.MiaoYu.WebPayApi/Dockerfile index 00f8043..25bdf3e 100644 --- a/src/2-api/HuanMeng.MiaoYu.WebPayApi/Dockerfile +++ b/src/2-api/HuanMeng.MiaoYu.WebPayApi/Dockerfile @@ -31,4 +31,4 @@ RUN dotnet publish "./HuanMeng.MiaoYu.WebPayApi.csproj" -c $BUILD_CONFIGURATION FROM base AS final WORKDIR /app/disk COPY --from=publish /app/disk/publish . -ENTRYPOINT ["dotnet", "HuanMeng.MiaoYu.WebPayApi.dll"] \ No newline at end of file +ENTRYPOINT ["dotnet", "HuanMeng.MiaoYu.WebPayApi.dll"] diff --git a/src/2-api/HuanMeng.MiaoYu.WebPayApi/HuanMeng.MiaoYu.WebPayApi.csproj b/src/2-api/HuanMeng.MiaoYu.WebPayApi/HuanMeng.MiaoYu.WebPayApi.csproj index fcff0db..9a3079a 100644 --- a/src/2-api/HuanMeng.MiaoYu.WebPayApi/HuanMeng.MiaoYu.WebPayApi.csproj +++ b/src/2-api/HuanMeng.MiaoYu.WebPayApi/HuanMeng.MiaoYu.WebPayApi.csproj @@ -16,6 +16,7 @@ + diff --git a/src/2-api/HuanMeng.MiaoYu.WebPayApi/Program.cs b/src/2-api/HuanMeng.MiaoYu.WebPayApi/Program.cs index ec038d4..f8ecbd2 100644 --- a/src/2-api/HuanMeng.MiaoYu.WebPayApi/Program.cs +++ b/src/2-api/HuanMeng.MiaoYu.WebPayApi/Program.cs @@ -34,6 +34,11 @@ builder.Services.AddSingleton(typeof(ILogger), serviceProvider => var loggerFactory = serviceProvider.GetRequiredService(); return loggerFactory.CreateLogger(); }); +builder.Services.AddSingleton(typeof(ILogger), serviceProvider => +{ + var loggerFactory = serviceProvider.GetRequiredService(); + return loggerFactory.CreateLogger(); +}); // 检索程序集信息 AssemblyInfo assemblyInfo = AssemblyInfoHelper.GetAssemblyInfo(); // Add services to the container. diff --git a/src/2-api/HuanMeng.MiaoYu.WebPayApi/appsettings.json b/src/2-api/HuanMeng.MiaoYu.WebPayApi/appsettings.json index e916e18..a39ff30 100644 --- a/src/2-api/HuanMeng.MiaoYu.WebPayApi/appsettings.json +++ b/src/2-api/HuanMeng.MiaoYu.WebPayApi/appsettings.json @@ -20,7 +20,7 @@ { "Name": "File", "Args": { - "path": "../output/logs/info/log-.txt", + "path": "../output/pay-logs/info/log-.txt", "rollingInterval": "Day", "restrictedToMinimumLevel": "Information", //写入日志的级别 "shared": true @@ -30,7 +30,7 @@ { "Name": "File", "Args": { - "path": "../output/logs/error/log-.txt", + "path": "../output/pay-logs/error/log-.txt", "rollingInterval": "Day", //日志文件按天滚动生成。 "restrictedToMinimumLevel": "Error", //写入日志的级别 //包括 Verbose、Debug、Information、Warning、Error 和 Fatal "shared": true //不占用文件 @@ -40,7 +40,7 @@ { "Name": "File", "Args": { - "path": "../output/logs/debug/log-.txt", + "path": "../output/pay-logs/debug/log-.txt", "rollingInterval": "Day", //日志文件按天滚动生成。 "restrictedToMinimumLevel": "Debug", //写入日志的级别 //包括 Verbose、Debug、Information、Warning、Error 和 Fatal "shared": true //不占用文件