Beispiel #1
0
        public static void NewInstance(string dsn, SentryConfig sentryConfig = null, RavenOptionType option = null)
        {
            if (m_instance == null)
            {
                GameObject obj = new GameObject("RavenObj");
                obj.AddComponent <Unity3DRavenCS>();
                m_instance = obj.GetComponent <Unity3DRavenCS>();

                m_instance.m_dsn = new DSN(dsn);
                if (!m_instance.m_dsn.isValid)
                {
                    m_instance.m_valid = false;
                    Debug.Log("Unity3DRavenCS is disabled because the DSN is invalid.");
                }
                else
                {
                    m_instance.m_valid = true;
                }

                m_instance.m_option       = option == null ? new RavenOptionType() : option;
                m_instance.m_sentryConfig = sentryConfig == null ? new SentryConfig() : sentryConfig;

                m_instance.Init();

                DontDestroyOnLoad(obj);
            }
        }
 public MessagePacket(SentryConfig sentryConfig, string message, LogType logType, Dictionary <string, string> tags, System.Diagnostics.StackTrace stackTrace) : base(sentryConfig, message, tags)
 {
     this.m_level = ToLogLevelFromLogType(logType);
     if (stackTrace != null)
     {
         m_stacktrace = new RavenStackTrace(stackTrace);
     }
 }
#pragma warning restore 0414

        public MessagePacket(SentryConfig sentryConfig, string message, LogType logType, Dictionary <string, string> tags, string stackTrace) : base(sentryConfig, message, tags)
        {
            m_level = ToLogLevelFromLogType(logType);
            if (!string.IsNullOrEmpty(stackTrace))
            {
                m_stacktrace = new RavenStackTrace(stackTrace);
            }
        }
 public Packet(SentryConfig sentryConfig, string message, Dictionary <string, string> tags)
 {
     m_eventID     = Guid.NewGuid().ToString("N");
     m_message     = message;
     m_platform    = "csharp";
     m_sdk.name    = "Unity3D-Raven-CS";
     m_sdk.version = Version.VERSION;
     m_timestamp   = DateTime.UtcNow.ToString("s");
     m_release     = sentryConfig.release;
     m_tags        = tags;
     m_fingerprint = GetFingerPrint(message);
 }
 public ExceptionPacket(SentryConfig sentryConfig, string message, System.Diagnostics.StackTrace stackTrace, Dictionary <string, string> tags) : base(sentryConfig, message, tags)
 {
     this.m_exception = new RavenException(message, stackTrace);
 }
#pragma warning restore 0414

        public ExceptionPacket(SentryConfig sentryConfig, Exception exception, Dictionary <string, string> tags) : base(sentryConfig, exception.Message, tags)
        {
            this.m_exception = new RavenException(exception);
        }