private static void ShowLogEditorConsole(LogEntry pEntry) { #if UNITY_WSA || UNITY_WP8 || UNITY_WP8_1 UnityEngine.Debug.Log("<color=black>[" + pEntry.LogType + "]\t" + pEntry.Message + "</color>"); #else UnityEngine.Debug.Log("<color=" + pEntry.LogType.GetAttribute<LogTypeAttribute>().Color + ">[" + pEntry.LogType + "]\t" + pEntry.Message + "</color>"); #endif }
internal void AddLogEntry(LogEntry aLogEntry) { mLogFile.AddLogEntry(aLogEntry); if (LogConfig.SAVE_LOG_TO_FILE) { mLogFile.Save(); } }
private static void ShowLog(LogEntry pEntry) { if ((int)pEntry.LogType <= LogConfig.UNITY_EDITOR_CONSOLE_LOG_LEVEL) { ShowLogEditorConsole(pEntry); } if ((int)pEntry.LogType <= LogConfig.IN_GAME_CONSOLE_LOG_LEVEL) { ShowLogDebugText(pEntry); } }
internal LogEntry Create(string pMessage, ELogType pType, ELogCategory pCategory) { mEntry = new LogEntry() { LogType = pType, Message = pMessage, Time = DateTime.Now, Category = pCategory }; HandleStackTrace(); return mEntry; }
public void AddLogEntry(LogEntry aLogEntry) { LogEntries.Add(aLogEntry); }
private static void ShowLogDebugText(LogEntry pEntry) { DebugText.Log(pEntry.Message); }