|
|
@@ -4,6 +4,7 @@ using Business.Core.MongoDBHelper;
|
|
|
using Microsoft.AspNetCore.Hosting;
|
|
|
using Microsoft.Extensions.Configuration;
|
|
|
using Microsoft.Extensions.Hosting;
|
|
|
+using NLog;
|
|
|
using NLog.Web;
|
|
|
using Serilog;
|
|
|
using Serilog.Events;
|
|
|
@@ -21,7 +22,9 @@ namespace Business
|
|
|
.AddEnvironmentVariables()
|
|
|
.Build();
|
|
|
NLog.Extensions.Logging.ConfigSettingLayoutRenderer.DefaultConfiguration = configuration;
|
|
|
-
|
|
|
+ var appBasePath = System.IO.Directory.GetCurrentDirectory();
|
|
|
+ NLog.GlobalDiagnosticsContext.Set("appbasepath", appBasePath);
|
|
|
+ var logger = LogManager.LoadConfiguration("nlog.config").GetCurrentClassLogger();
|
|
|
Log.Logger = new LoggerConfiguration()
|
|
|
#if DEBUG
|
|
|
.MinimumLevel.Debug()
|