Automap (client) [VS plugin mod]
Rev. | 1c8849af29a916822885541c010ffc4b7bb90d5a |
---|---|
Größe | 691 Bytes |
Zeit | 2022-05-02 03:22:25 |
Autor | melchior |
Log Message | 2nd Entity processing fix attempt
|
using System;
using System.IO;
using Vintagestory.API.Common;
namespace ShardProcessor
{
public class LogAdaptor : LoggerBase
{
private StreamWriter fileOutput;
public LogAdaptor( )
{
fileOutput = File.CreateText("SP_Log.txt");
fileOutput.AutoFlush = true;
}
protected override void LogImpl(EnumLogType logType, string format, params object[ ] args)
{
string formatedText = null;
if (args != null && args.Length > 0) {
formatedText = string.Format(format, args);
}
else { formatedText = format; }
fileOutput.WriteLine($"«{logType}» {formatedText}");
}
~LogAdaptor( )
{
fileOutput.Flush( );
fileOutput.Close( );
}
}
}