Files
Torch/Piston/Logger.cs
2016-09-16 19:57:18 -07:00

30 lines
670 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Sandbox;
using VRage.Utils;
namespace Piston
{
public static class Logger
{
public const string Prefix = "[PISTON]";
public static void Write(string message)
{
var msg = $"{Prefix}: {message}";
MySandboxGame.Log.WriteLineAndConsole(msg);
if (!MySandboxGame.Log.LogEnabled)
{
try
{
MySandboxGame.Log.AppendToClosedLog(msg);
}
catch (Exception) { }
}
}
}
}