public override void OnPluginLoad()
{
_debugChannel = Plugin.Debug.AddChannel("com.projectgame.admintools.logging");
Plugin.Debug.Log(_debugChannel, "Initialized Logging");
string filePath = DataDir + "/" + DateTime.Now.ToShortDateString().Replace('/', '_').Replace('.', '_') + "_" + DateTime.Now.ToLongTimeString().Replace(':', '_') + ".txt";
_stream = new FileStream(filePath, FileMode.Create);
_writer = new StreamWriter(_stream);
foreach (KeyValuePair<int, string> cachedMessage in Plugin.Debug.Cache)
WriteMessage(cachedMessage.Key, cachedMessage.Value);
Plugin.Debug.MessageListened += WriteMessage;
}