public static void log(string text, string trace) { lock (lockObject) { if (_inst == null) { _inst = new SMainLog(GetFileName()); } _inst.Log(text, trace); _inst.close(); _inst = null; } }
public static void log(Exception ex, string text) { lock (lockObject) { if (_inst == null) { _inst = new SMainLog(GetFileName()); } _inst.Log("[" + text + "] Error: " + ex.Message, ex.StackTrace); _inst.close(); _inst = null; } if (OnWrite != null) { OnWrite(ex.Message, text); } }
public static void log(Exception ex) { lock (lockObject) { if (_inst == null) { _inst = new SMainLog(GetFileName()); } _inst.Log("Error: " + ex.Message, ex.StackTrace); if (ex.InnerException != null) { _inst.Log("InnerException: " + ex.InnerException.Message, ex.InnerException.StackTrace); } _inst.close(); _inst = null; } if (OnWrite != null) { OnWrite(ex.Message, ex.StackTrace); } }