private static void InternalSafeLog(LogType type, LOG_CHANNEL channel, string message) { lock (s_Lock) { DebugData data = new DebugData(channel, message, type); m_WaitingList.Add(data); } }
public static void DebugLog(LOG_CHANNEL channel, string message) { string content = CoreLogger.Debug(channel, message); if (OnLogReceived != null) { OnLogReceived(channel, LogType.Log, content); } }
public static void Error(LOG_CHANNEL channel, string message, UnityEngine.Object context = null) { string content = CoreLogger.Error(channel, message); if (OnLogReceived != null) { OnLogReceived(channel, LogType.Error, content); } }
public static void EnableLogChannel(LOG_CHANNEL channel, bool bEnable) { if (!m_dictLogFlag.ContainsKey(channel)) { return; } m_dictLogFlag[channel] = bEnable; }
private static string GetLogText(LOG_CHANNEL channel, string strLog) { if (!IsLogActive(channel)) { return(null); } return(string.Format("<color=yellow>{0}{1}</color>: {2}", channel, Time.frameCount, strLog)); }
public static string Error(LOG_CHANNEL channel, string strLog) { string strErrorLog = GetLogText(channel, strLog); if (strErrorLog == null) { return(strErrorLog); } UnityEngine.Debug.LogError(strErrorLog); return(strErrorLog); }
public static string Warning(LOG_CHANNEL channel, string strLog) { string strWarning = GetLogText(channel, strLog); if (strWarning == null) { return(strWarning); } UnityEngine.Debug.LogWarning(strWarning); return(strWarning); }
public static bool IsLogActive(LOG_CHANNEL channel) { if (!m_bLogShow) { return(false); } if (!m_bLogInit) { return(true); } if (!m_dictLogFlag.ContainsKey(channel)) { return(false); } return(m_dictLogFlag[channel]); }
public static void SafeError(LOG_CHANNEL channel, string message) { InternalSafeLog(LogType.Error, channel, message); }
public static void SafeWarning(LOG_CHANNEL channel, string message) { InternalSafeLog(LogType.Warning, channel, message); }
public static void SafeDebugLog(LOG_CHANNEL channel, string message) { InternalSafeLog(LogType.Log, channel, message); }
public DebugData(LOG_CHANNEL channel, string message, LogType type) { this.channel = channel; this.message = message; this.type = type; }
public static void LogFormat(LOG_CHANNEL channel, string message, params object[] paramList) { string message2 = string.Format(message, paramList); DebugLog(channel, message2); }