Removed console logging.

This commit is contained in:
Harrison Deng 2020-05-27 10:24:57 -05:00
parent 4fc84e6a97
commit a3401e1c22
3 changed files with 3 additions and 4 deletions

View File

@ -12,8 +12,7 @@ namespace SlatedGameToolkit.Framework {
/// </summary>
public static class GameEngine {
public static readonly Logger logger = new LoggerConfiguration().
WriteTo.Console().
WriteTo.File("SlatedGameToolKit.Framework.Log").
WriteTo.File("SlatedGameToolKit.Framework.Log", rollingInterval: RollingInterval.Day, fileSizeLimitBytes: 1048576, rollOnFileSizeLimit: true).
CreateLogger();
private static readonly object ignitionLock = new object();
private static Thread thread;
@ -32,7 +31,7 @@ namespace SlatedGameToolkit.Framework {
return 1 / TimeSpan.FromMilliseconds(updateDeltaTime).TotalSeconds;
}
set {
Interlocked.Exchange(ref updateDeltaTime, Math.Min(5, (long) TimeSpan.FromSeconds(1 / value).TotalMilliseconds));
Interlocked.Exchange(ref updateDeltaTime, Math.Max(5, (long) TimeSpan.FromSeconds(1 / value).TotalMilliseconds));
deltaChanged = true;
}
}

View File

@ -7,7 +7,6 @@
<ItemGroup>
<PackageReference Include="Serilog" Version="2.9.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="3.1.1" />
<PackageReference Include="Serilog.Sinks.File" Version="4.1.0" />
</ItemGroup>

View File

@ -13,6 +13,7 @@ namespace SlatedGameToolkit.Tools.Commands
public bool Execute(IInteractable interactable, string[] args)
{
if (args.Length != 1) return false;
args[0] = args[0].ToLower();
if (args[0].Equals("start")) {
if (GameEngine.Running) {
interactable.Tell("Engine is already running!");