Forráskód Böngészése

😁增加控制台日志时间格式化

zuohuaijun 2 éve
szülő
commit
3a8a55d5a7
1 módosított fájl, 7 hozzáadás és 7 törlés
  1. 7 7
      Admin.NET/Admin.NET.Core/Logging/LoggingSetup.cs

+ 7 - 7
Admin.NET/Admin.NET.Core/Logging/LoggingSetup.cs

@@ -17,13 +17,13 @@ public static class LoggingSetup
     /// <param name="services"></param>
     /// <param name="services"></param>
     public static void AddLoggingSetup(this IServiceCollection services)
     public static void AddLoggingSetup(this IServiceCollection services)
     {
     {
-        //// 控制台日志格式化
-        //services.AddConsoleFormatter(options =>
-        //{
-        //    options.DateFormat = "yyyy-MM-dd HH:mm:ss(zzz) dddd";
-        //    //options.WithTraceId = true; // 显示线程Id
-        //    //options.WithStackFrame = true; // 显示程序集
-        //});
+        // 控制台日志格式化
+        services.AddConsoleFormatter(options =>
+        {
+            options.DateFormat = "yyyy-MM-dd HH:mm:ss(zzz) dddd";
+            //options.WithTraceId = true; // 显示线程Id
+            //options.WithStackFrame = true; // 显示程序集
+        });
 
 
         // 日志监听
         // 日志监听
         services.AddMonitorLogging(options =>
         services.AddMonitorLogging(options =>