// ReSharper disable once SwitchStatementHandlesSomeKnownEnumValuesWithDefault private static void LogMessageReceived(string condition, string stackTrace, LogType type) { Listener?.Invoke(type, condition); switch (type) { case LogType.Assert: LogSaverUtils.Add(LogPath, condition, "Assert"); break; case LogType.Log: LogSaverUtils.Add(LogPath, condition, "Log"); break; case LogType.Warning: LogSaverUtils.Add(LogPath, condition, "Warning"); break; case LogType.Error: LogSaverUtils.Add(LogPath, condition, "Error"); // LogSaverUtils.Add(LogPath, stackTrace, "Error"); break; case LogType.Exception: LogSaverUtils.Add(LogPath, condition, "Exception"); // LogSaverUtils.Add(LogPath, stackTrace, "Exception"); break; } }
/// <summary> /// ログ出力終了 /// </summary> public static void Stop() { Debug.Log("Stop FileLogger."); Application.logMessageReceived -= LogMessageReceived; LogSaverUtils.Close(LogPath); }