fix: Fixes structured logging (#1043)
- [X] Fixes various bugs in logging.
This commit is contained in:
parent
78bb4f4bb2
commit
6e69d25e33
31 changed files with 96 additions and 102 deletions
|
|
@ -73,7 +73,7 @@ namespace Server.Engines.Chat
|
|||
|
||||
if (handler == null)
|
||||
{
|
||||
state.LogInfo("Unknown chat action 0x{0:X}: {1}", actionID, param);
|
||||
state.LogInfo($"Unknown chat action 0x{actionID:X}: {param}");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ namespace Server.Engines.MLQuests.Objectives
|
|||
|
||||
if (itemid is <= 0 or > 0x4000)
|
||||
{
|
||||
logger.Warning("Cliloc {0} is likely giving the wrong item ID", name.Number);
|
||||
logger.Warning("Cliloc {Number} is likely giving the wrong item ID", name.Number);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -107,13 +107,16 @@ namespace Server.Engines.Spawners
|
|||
|
||||
watch.Stop();
|
||||
|
||||
logger.Information("Generated {0} spawners ({1:F2} seconds, {2} failures)");
|
||||
from.SendMessage(
|
||||
"GenerateSpawners: Generated {0} spawners ({1:F2} seconds, {2} failures)",
|
||||
logger.Information(
|
||||
"Generated {Count} spawners ({Duration:F2} seconds, {Failures} failures)",
|
||||
totalGenerated,
|
||||
watch.Elapsed.TotalSeconds,
|
||||
totalFailures
|
||||
);
|
||||
|
||||
from.SendMessage(
|
||||
$"GenerateSpawners: Generated {totalGenerated} spawners ({watch.Elapsed.TotalSeconds:F2} seconds, {totalFailures} failures)"
|
||||
);
|
||||
}
|
||||
|
||||
private static void ParseSpawnerList(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue