/// <summary> /// /// </summary> public static void Initialize(string file, bool async) { if (_singleton != null) { return; } _singleton = new LogFile(file, async); }
/// <summary> /// /// </summary> public static void Destroy() { if (_singleton == null) { return; } _singleton._streamClose = true; _singleton._isAlive = false; if (_singleton._task != null) _singleton._task.Wait(); _singleton._writer.Close(); _singleton = null; }