Exemplo n.º 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);
            }
        }
Exemplo n.º 2
0
 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);
     }
 }
Exemplo n.º 3
0
#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);
            }
        }
Exemplo n.º 4
0
 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);
 }
Exemplo n.º 5
0
 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);
 }
Exemplo n.º 6
0
#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);
        }