raven

package
v0.0.0-...-8e3ef77 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 13, 2013 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package raven is a client and library for sending messages and exceptions to Sentry: http://getsentry.com

Usage:

Create a new client using the NewClient() function. The value for the DSN parameter can be obtained from the project page in the Sentry web interface. After the client has been created use the CaptureMessage method to send messages to the server.

client, err := raven.NewClient(dsn)
...
id, err := client.CaptureMessage("some text")

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	URL       *url.URL
	PublicKey string
	SecretKey string
	Project   string
	// contains filtered or unexported fields
}

func NewClient

func NewClient(dsn string) (client *Client, err error)

NewClient creates a new client for a server identified by the given dsn A dsn is a string in the form:

{PROTOCOL}://{PUBLIC_KEY}:{SECRET_KEY}@{HOST}/{PATH}{PROJECT_ID}

eg:

http://abcd:efgh@sentry.example.com/sentry/project1

func (Client) CaptureMessage

func (client Client) CaptureMessage(message ...string) (result string, err error)

CaptureMessage sends a message to the Sentry server. The resulting string is an event identifier.

func (Client) CaptureMessagef

func (client Client) CaptureMessagef(format string, a ...interface{}) (result string, err error)

CaptureMessagef is similar to CaptureMessage except it is using Printf like parameters for formatting the message

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL