public void OnLogSave(ToastLoggerLogObject logObject)
        {
            LogEntry log = new LogEntry();

            log.LogType       = logObject.GetLoggerType();
            log.LogLevel      = logObject.GetLogLevel();
            log.Message       = logObject.GetLogMessage();
            log.TransactionId = logObject.GetTransactionId();
            log.CreateTime    = logObject.GetCreateTime();

            if (_listenerLogger != null)
            {
                _listenerLogger.OnSave(log);
            }
        }
        public void OnLogFilter(string filterName, ToastLoggerLogObject logObject)
        {
            LogEntry log = new LogEntry();

            log.LogType       = logObject.GetLoggerType();
            log.LogLevel      = logObject.GetLogLevel();
            log.Message       = logObject.GetLogMessage();
            log.TransactionId = logObject.GetTransactionId();
            log.CreateTime    = logObject.GetCreateTime();

            if (_listenerLogger != null)
            {
                _listenerLogger.OnFilter(log, LogFilter.FromName(filterName));
            }
        }
예제 #3
0
 public bool Filter(ToastLoggerLogObject logData)
 {
     if (ToastLoggerSettings.Instance.isCrash)
     {
         return(true);
     }
     else
     {
         if (logData.GetLoggerType().Equals(ToastLoggerType.CRASH))
         {
             return(false);
         }
         else
         {
             return(true);
         }
     }
 }
 public bool Filter(ToastLoggerLogObject logData)
 {
     if (ToastLoggerSettings.Instance.isSession)
     {
         return(true);
     }
     else
     {
         if (logData.GetLoggerType().Equals(ToastLoggerType.SESSION))
         {
             return(false);
         }
         else
         {
             return(true);
         }
     }
 }
 public bool Filter(ToastLoggerLogObject logData)
 {
     if (ToastLoggerSettings.Instance.isNormal)
     {
         return(true);
     }
     else
     {
         if (logData.GetLoggerType().Equals(ToastLoggerType.NORMAL))
         {
             return(false);
         }
         else
         {
             return(true);
         }
     }
 }
예제 #6
0
        public bool Filter(ToastLoggerLogObject logData)
        {
            if (ToastLoggerSettings.Instance.isLogTypeFilter == false)
            {
                return(true);
            }
            else
            {
                foreach (string logType in ToastLoggerSettings.Instance.filterLogTypes)
                {
                    string strLogType = logData.GetLoggerType();
                    if (strLogType.Equals(logType))
                    {
                        return(false);
                    }
                }

                return(true);
            }
        }
        public void OnLogSuccess(ToastLoggerLogObject logObject)
        {
            LogEntry log = new LogEntry();

            log.LogType       = logObject.GetLoggerType();
            log.LogLevel      = logObject.GetLogLevel();
            log.Message       = logObject.GetLogMessage();
            log.TransactionId = logObject.GetTransactionId();
            log.CreateTime    = logObject.GetCreateTime();

            if (log.LogType == ToastLoggerType.CRASH_FROM_UNITY)
            {
                InvokeCrashListener(true, log);
            }
            else
            {
                if (_listenerLogger != null)
                {
                    _listenerLogger.OnSuccess(log);
                }
            }
        }
        public void OnLogError(ToastLoggerLogObject logObject, string errorMessage)
        {
            LogEntry log = new LogEntry();

            log.LogType       = logObject.GetLoggerType();
            log.LogLevel      = logObject.GetLogLevel();
            log.Message       = logObject.GetLogMessage();
            log.TransactionId = logObject.GetTransactionId();
            log.CreateTime    = logObject.GetCreateTime();

            if (log.LogType == ToastLoggerType.CRASH_FROM_UNITY)
            {
                InvokeCrashListener(false, log);
            }
            else
            {
                if (_listenerLogger != null)
                {
                    _listenerLogger.OnError(log,
                                            string.IsNullOrEmpty(errorMessage) ? "Unknown error" : errorMessage);
                }
            }
        }