Exemple #1
0
    // Token: 0x0601564D RID: 87629 RVA: 0x0056D140 File Offset: 0x0056B340
    private static void _OnLogCallbackHandler(string condition, string stackTrace, LogType type)
    {
        if (BuglyAgent._LogCallbackEventHandler != null)
        {
            BuglyAgent._LogCallbackEventHandler(condition, stackTrace, type);
        }
        if (!BuglyAgent.IsInitialized)
        {
            return;
        }
        if (!string.IsNullOrEmpty(condition) && condition.Contains("[BuglyAgent] <Log>"))
        {
            return;
        }
        if (BuglyAgent._uncaughtAutoReportOnce)
        {
            return;
        }
        LogSeverity logSeverity = LogSeverity.Log;

        switch (type)
        {
        case LogType.Error:
            logSeverity = LogSeverity.LogError;
            break;

        case LogType.Assert:
            logSeverity = LogSeverity.LogAssert;
            break;

        case LogType.Warning:
            logSeverity = LogSeverity.LogWarning;
            break;

        case LogType.Log:
            logSeverity = LogSeverity.LogDebug;
            break;

        case LogType.Exception:
            logSeverity = LogSeverity.LogException;
            break;
        }
        if (logSeverity == LogSeverity.Log)
        {
            return;
        }
        BuglyAgent._HandleException(logSeverity, null, condition, stackTrace, true);
    }