Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConsoleLogger ¶
type ConsoleLogger struct {
// contains filtered or unexported fields
}
Logs errors to the console.
func (ConsoleLogger) LogError ¶
func (c ConsoleLogger) LogError(err TrackerError)
Logs an error to the console.
type ErrorLogger ¶
type ErrorLogger interface {
LogError(err TrackerError)
}
EventLoggers keep a log of errors.
type SentryErrorLogger ¶
type SentryErrorLogger struct {
// contains filtered or unexported fields
}
Sentry is used to log errors.
func (SentryErrorLogger) LogError ¶
func (s SentryErrorLogger) LogError(err TrackerError)
Logs an error to Sentry.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
The Server is the Tracker API.
func NewServer ¶
func NewServer(params ServerParams) Server
Creates a new Server that does no logging.
type ServerParams ¶
type ServerParams struct { ErrorLogger ErrorLogger EventLogger logger.Logger }
Parameters passed to NewServer().
type TrackerError ¶
An unrecoverable error in Tracker.
func NewTrackerErrorFromError ¶
func NewTrackerErrorFromError(err error, context map[string]string) TrackerError
Convert a Go error into a TrackerError.
func (TrackerError) Error ¶
func (err TrackerError) Error() string
Returns the error description in full.
func (TrackerError) ToMap ¶
func (err TrackerError) ToMap() map[string]string
Convert a TrackerError to a Map. Useful for JSON-based error logging due to its hierarchy.
Click to show internal directories.
Click to hide internal directories.