コード例 #1
0
        /// <summary>
        /// Creates a new instance of
        /// <see cref="JsonPacket" /> for the specified
        /// <paramref name="project" />.
        /// </summary>
        /// <param name="project">The project.</param>
        /// <param name="message">The message to capture.</param>
        /// <param name="level">The <see cref="ErrorLevel" /> of the captured <paramref name="message" />. Default <see cref="ErrorLevel.Info" />.</param>
        /// <param name="tags">The tags to annotate the captured <paramref name="message" /> with.</param>
        /// <param name="extra">The extra metadata to send with the captured <paramref name="message" />.</param>
        /// <returns>
        /// A new instance of <see cref="JsonPacket" /> for the specified <paramref name="project" />.
        /// </returns>
        public JsonPacket Create(string project,
                                 SentryMessage message,
                                 ErrorLevel level = ErrorLevel.Info,
                                 IDictionary<string, string> tags = null,
                                 object extra = null)
        {
            var json = new JsonPacket(project)
            {
                Message = message != null ? message.ToString() : null,
                MessageObject = message,
                Level = level,
                Tags = tags,
                Extra = extra
            };

            return OnCreate(json);
        }
コード例 #2
0
        public JsonPacket Create(string project,
            SentryMessage message,
            ErrorLevel level = ErrorLevel.Info,
            IDictionary<string, string> tags = null,
            string[] fingerprint = null,
            object extra = null)
        {
            var @event = new SentryEvent(message)
            {
                Level = level,
                Extra = extra,
                Tags = tags,
                Fingerprint = fingerprint
            };

            return Create(project, @event);
        }
コード例 #3
0
        public async Task<string> CaptureExceptionAsync(Exception exception,
                                                        SentryMessage message = null,
                                                        ErrorLevel level = ErrorLevel.Error,
                                                        IDictionary<string, string> tags = null,
                                                        string[] fingerprint = null,
                                                        object extra = null)
        {
            var @event = new SentryEvent(exception)
            {
                Message = message,
                Level = level,
                Extra = extra,
                Tags = tags,
                Fingerprint = fingerprint
            };

            return await CaptureAsync(@event);
        }
コード例 #4
0
        /// <summary>
        /// Captures the message.
        /// </summary>
        /// <param name="message">The message to capture.</param>
        /// <param name="level">The <see cref="ErrorLevel" /> of the captured message.</param>
        /// <param name="tags">The tags to annotate the captured exception with.</param>
        /// <param name="extra">The extra metadata to send with the captured exception.</param>
        /// <returns>
        /// The <see cref="JsonPacket.EventID"/> of the successfully captured message, or <c>null</c> if it fails.
        /// </returns>
        public string CaptureMessage(string message,
            ErrorLevel level = ErrorLevel.Info,
            Dictionary<string, string> tags = null,
            object extra = null)
        {
            JsonPacket packet = new JsonPacket(CurrentDsn.ProjectID)
            {
                Message = message,
                Level = level,
                Tags = tags,
                Extra = extra
            };

            return Send(packet, CurrentDsn);
        }
コード例 #5
0
ファイル: RavenClient.cs プロジェクト: striglone/raven-csharp
        public int CaptureMessage(string message, ErrorLevel level = ErrorLevel.info, string[][] tags = null, object extra = null)
        {
            JsonPacket packet = new JsonPacket(CurrentDSN.ProjectID);
            packet.Message = message;
            packet.Level = level;
            packet.Tags = tags;
            packet.Extra = extra;

            Send(packet, CurrentDSN);

            return 0;
        }
コード例 #6
0
ファイル: RavenClient.cs プロジェクト: jalaziz/raven-csharp
 public int CaptureMessage(string message, ErrorLevel level, Dictionary<string, string> tags)
 {
     return CaptureMessage(message, level, tags, null);
 }
コード例 #7
0
ファイル: RavenClient.cs プロジェクト: jalaziz/raven-csharp
 public int CaptureMessage(string message, ErrorLevel level)
 {
     return CaptureMessage(message, level, null, null);
 }
コード例 #8
0
ファイル: RavenClient.cs プロジェクト: kimsama/Unity3D-Raven
        public int CaptureMessage(string message, ErrorLevel level /*= ErrorLevel.info*/, Dictionary<string, string> tags /*= null*/, object extra /*= null*/)
        {
            JsonPacket packet = new JsonPacket(CurrentDSN.ProjectID);
            packet.Message = message;
            packet.Level = level;
            packet.Tags = tags;
            packet.Extra = extra;

            Send(packet, CurrentDSN);

            return 0;
        }
コード例 #9
0
ファイル: RavenClient.cs プロジェクト: getsentry/raven-csharp
        public string CaptureMessage(SentryMessage message,
            ErrorLevel level = ErrorLevel.Info,
            IDictionary<string, string> tags = null,
            string[] fingerprint = null,
            object extra = null)
        {
            var @event = new SentryEvent(message)
            {
                Level = level,
                Extra = extra,
                Tags = MergeTags(tags),
                Fingerprint = fingerprint
            };

            return Capture(@event);
        }
コード例 #10
0
ファイル: RavenClient.cs プロジェクト: getsentry/raven-csharp
        public string CaptureException(Exception exception,
            SentryMessage message = null,
            ErrorLevel level = ErrorLevel.Error,
            IDictionary<string, string> tags = null,
            string[] fingerprint = null,
            object extra = null)
        {
            var @event = new SentryEvent(exception)
            {
                Message = message,
                Level = level,
                Extra = extra,
                Tags = MergeTags(tags),
                Fingerprint = fingerprint
            };

            return Capture(@event);
        }
コード例 #11
0
        public JsonPacket Create(string project,
            Exception exception,
            SentryMessage message = null,
            ErrorLevel level = ErrorLevel.Error,
            IDictionary<string, string> tags = null,
            string[] fingerprint = null,
            object extra = null)
        {
            var @event = new SentryEvent(exception)
            {
                Message = message,
                Level = level,
                Extra = extra,
                Tags = tags,
                Fingerprint = fingerprint,
            };

            return Create(project, @event);
        }
コード例 #12
0
ファイル: RavenClient.cs プロジェクト: rowandh/raven-csharp
 /// <summary>
 /// Captures the message.
 /// </summary>
 /// <param name="message">The message to capture.</param>
 /// <param name="level">The <see cref="ErrorLevel" /> of the captured <paramref name="message" />. Default <see cref="ErrorLevel.Info" />.</param>
 /// <param name="tags">The tags to annotate the captured <paramref name="message" /> with.</param>
 /// <param name="extra">The extra metadata to send with the captured <paramref name="message" />.</param>
 /// <returns>
 /// The <see cref="JsonPacket.EventID" /> of the successfully captured <paramref name="message" />, or <c>null</c> if it fails.
 /// </returns>
 public string CaptureMessage(SentryMessage message,
     ErrorLevel level = ErrorLevel.Info,
     Dictionary<string, string> tags = null,
     object extra = null)
 {
     JsonPacket packet = this.jsonPacketFactory.Create(CurrentDsn.ProjectID, message, level, tags, extra);
     return Send(packet, CurrentDsn);
 }
コード例 #13
0
ファイル: RavenClient.cs プロジェクト: rowandh/raven-csharp
 /// <summary>
 /// Captures the <see cref="Exception" />.
 /// </summary>
 /// <param name="exception">The <see cref="Exception" /> to capture.</param>
 /// <param name="message">The optional messge to capture. Default: <see cref="Exception.Message" />.</param>
 /// <param name="level">The <see cref="ErrorLevel" /> of the captured <paramref name="exception" />. Default: <see cref="ErrorLevel.Error" />.</param>
 /// <param name="tags">The tags to annotate the captured <paramref name="exception" /> with.</param>
 /// <param name="extra">The extra metadata to send with the captured <paramref name="exception" />.</param>
 /// <returns>
 /// The <see cref="JsonPacket.EventID" /> of the successfully captured <paramref name="exception" />, or <c>null</c> if it fails.
 /// </returns>
 public string CaptureException(Exception exception,
     SentryMessage message = null,
     ErrorLevel level = ErrorLevel.Error,
     IDictionary<string, string> tags = null,
     object extra = null)
 {
     JsonPacket packet = this.jsonPacketFactory.Create(this.currentDsn.ProjectID,
                                                       exception,
                                                       message,
                                                       level,
                                                       tags,
                                                       extra);
     return Send(packet, CurrentDsn);
 }
コード例 #14
0
        public async Task<string> CaptureMessageAsync(SentryMessage message,
                                                      ErrorLevel level = ErrorLevel.Info,
                                                      IDictionary<string, string> tags = null,
                                                      string[] fingerprint = null,
                                                      object extra = null)
        {
            var @event = new SentryEvent(message)
            {
                Level = level,
                Extra = extra,
                Tags = tags,
                Fingerprint = fingerprint
            };

            return await CaptureAsync(@event);
        }
コード例 #15
0
ファイル: Sentry.cs プロジェクト: RyuaNerin/DFAssist
 internal static void ReportAsync(string message, ErrorLevel level = ErrorLevel.Debug)
 {
     var @event = new SentryEvent(new SentryMessage(message));
     @event.Level = level;
     ReportAsync(@event);
 }