fix: Makes logging more consistent (#1246)

This commit is contained in:
Kamron Batman 2022-11-13 00:36:23 -08:00 committed by GitHub
parent 8e0d01d4be
commit d8cfb6b935
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 90 additions and 69 deletions

View file

@ -199,7 +199,7 @@ public partial class Timer
if (lastRing && slot > _ringSize)
{
logger.Error(
"Timer {Timer} has a duration of {Duration}ms, more than max capacity of {MaxDuration}ms.\n{StackTrace}",
$"Timer {{Timer}} has a duration of {{Duration}}ms, more than max capacity of {{MaxDuration}}ms.{Environment.NewLine}{{StackTrace}}",
timer.GetType(),
originalDelay,
_maxDuration,
@ -228,8 +228,8 @@ public partial class Timer
public static void DumpInfo(TextWriter tw)
{
tw.WriteLine($"Date: {Core.Now.ToLocalTime()}\n");
tw.WriteLine($"Pool - Count: {_poolCount}; Capacity {_poolCapacity}\n");
tw.WriteLine($"Date: {Core.Now.ToLocalTime()}{Environment.NewLine}");
tw.WriteLine($"Pool - Count: {_poolCount}; Capacity {_poolCapacity}{Environment.NewLine}");
var total = 0.0;
var hash = new Dictionary<string, int>();