public void Log(string method, string message)
{
try
{
using (StreamWriter w = File.AppendText(Path.Combine(Application.persistentDataPath, "Data", "myLog.txt")))
{
w.WriteLine($"{DateTime.Now.ToString("yyyyMMdd-HH:mm.ss.ffffff")} - Method: {method}, Message: {message}");
}
}
catch { }
}
try
{
using (StreamWriter w = File.AppendText(Path.Combine(Application.persistentDataPath, "Data", "myLog.txt")))
{
w.WriteLine($"{DateTime.Now.ToString("yyyyMMdd-HH:mm.ss.ffffff")} - Method: {method}, Message: {message}");
}
}
catch { }
}
Comments
Post a Comment