using System; using System.Diagnostics; using Cirrious.CrossCore.Platform; namespace FormulaOneApp.Classic.Android { public class DebugTrace : IMvxTrace { public void Trace(MvxTraceLevel level, string tag, Func message) { Debug.WriteLine(tag + ":" + level + ":" + message()); } public void Trace(MvxTraceLevel level, string tag, string message) { Debug.WriteLine(tag + ":" + level + ":" + message); } public void Trace(MvxTraceLevel level, string tag, string message, params object[] args) { try { Debug.WriteLine(string.Format(tag + ":" + level + ":" + message, args)); } catch (FormatException) { Trace(MvxTraceLevel.Error, tag, "Exception during trace of {0} {1}", level, message); } } } }