• R/O
  • HTTP
  • SSH
  • HTTPS

Tags
Keine Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Automap (client) [VS plugin mod]


File Info

Rev. 1c8849af29a916822885541c010ffc4b7bb90d5a
Größe 691 Bytes
Zeit 2022-05-02 03:22:25
Autor melchior
Log Message

2nd Entity processing fix attempt

Content

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( );			          
		}
	}
}