public override void Log(IProfilatorData data) { if (BufferBytes < _maxBufferBytes) { Buffer.Add(data.GetFormattedData()); } else { try { Debug.LogFormat("Flushing! {0}", BufferBytes.ToString()); using (StreamWriter writer = File.AppendText(Filepath)) { foreach (var message in Buffer) { writer.WriteLine(message); } Buffer.Clear(); } } catch (IOException e) { Debug.LogError(e.Message); } } }
public override void ProcessData(IProfilatorData data) { if (_displayedText != null) { _displayedText.text = data.GetFormattedData(); } }
public override void Log(IProfilatorData data) { try { using (StreamWriter writer = File.AppendText(Filepath)) { string message = data.GetFormattedData(); writer.WriteLine(message); } } catch (IOException e) { UnityEngine.Debug.LogError(e.Message); } }
public override void Log(IProfilatorData data) { Debug.Log(data.GetFormattedData()); }