fix: Makes logging more consistent (#1246)
This commit is contained in:
parent
8e0d01d4be
commit
d8cfb6b935
15 changed files with 90 additions and 69 deletions
|
|
@ -350,7 +350,7 @@ public static class Core
|
|||
_ => "CTRL+C"
|
||||
};
|
||||
|
||||
logger.Information($"Detected {keypress} pressed.");
|
||||
logger.Information("Detected {Key} pressed.", keypress);
|
||||
e.Cancel = true;
|
||||
Kill();
|
||||
}
|
||||
|
|
@ -471,27 +471,20 @@ public static class Core
|
|||
|
||||
ServerConfiguration.Load();
|
||||
|
||||
logger.Information($"Running on {RuntimeInformation.FrameworkDescription}");
|
||||
logger.Information("Running on {Framework}", RuntimeInformation.FrameworkDescription);
|
||||
|
||||
var s = Arguments;
|
||||
|
||||
if (s.Length > 0)
|
||||
{
|
||||
logger.Information($"Running with arguments: {s}");
|
||||
logger.Information("Running with arguments: {Args}", s);
|
||||
}
|
||||
|
||||
if (MultiProcessor)
|
||||
{
|
||||
logger.Information($"Optimizing for {ProcessorCount} processor{(ProcessorCount == 1 ? "" : "s")}");
|
||||
logger.Information($"Optimizing for {{ProcessorCount}} processor{(ProcessorCount == 1 ? "" : "s")}", ProcessorCount);
|
||||
}
|
||||
|
||||
if (GCSettings.IsServerGC)
|
||||
{
|
||||
logger.Information("Server garbage collection mode enabled");
|
||||
}
|
||||
|
||||
logger.Information($"High resolution timing ({(Stopwatch.IsHighResolution ? "Supported" : "Unsupported")})");
|
||||
|
||||
var assemblyPath = Path.Join(BaseDirectory, AssembliesConfiguration);
|
||||
|
||||
// Load UOContent.dll
|
||||
|
|
@ -674,7 +667,7 @@ public static class Core
|
|||
if (errors.Length > 0)
|
||||
{
|
||||
Utility.PushColor(ConsoleColor.Red);
|
||||
Console.WriteLine($"{type}\n{errors.ToString()}");
|
||||
Console.WriteLine($"{type}{Environment.NewLine}{errors.ToString()}");
|
||||
Utility.PopColor();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue