Skip to content

Commit

Permalink
记录更多日志
Browse files Browse the repository at this point in the history
  • Loading branch information
walterlv committed Aug 22, 2024
1 parent dbfc583 commit 96d155a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions samples/LoggerSample.MainApp/Program.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using System.Diagnostics;
using System.Threading;
using System.Threading.Tasks;
using dotnetCampus.Logging.Attributes;
Expand Down Expand Up @@ -37,13 +38,14 @@ public static void Main(string[] args)

private static void Run()
{
Log.Debug("[TEST] 开始");
var stopwatch = Stopwatch.StartNew();
Log.Debug($"[TEST] 开始 {stopwatch.ElapsedMilliseconds}ms");
Parallel.For(0, 0x00004000, i =>
{
Thread.Sleep(1);
Thread.Sleep(0);
Log.Debug($"[TEST] {DateTime.Now:HH:mm:ss}");
});
Log.Debug("[TEST] 完成");
Log.Debug($"[TEST] 完成 {stopwatch.ElapsedMilliseconds}ms");
}
}

Expand Down

0 comments on commit 96d155a

Please sign in to comment.