sentryhook

package
v0.0.0-...-051df1f Latest Latest
Warning

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

Go to latest
Published: May 6, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultConverter

func DefaultConverter(entry *log.Entry, event *sentry.Event, hub *sentry.Hub)

DefaultConverter is the default log converter.

Types

type Converter

type Converter func(entry *log.Entry, event *sentry.Event, hub *sentry.Hub)

Converter converts log entry to sentry.

type Hook

type Hook struct {
	// contains filtered or unexported fields
}

Hook is a logrus hook structure.

func New

func New(levels []log.Level, options ...Option) Hook

New creates a new logrus hook.

func (Hook) Fire

func (hook Hook) Fire(entry *log.Entry) error

Fire sends an event to sentry.

func (Hook) Levels

func (hook Hook) Levels() []log.Level

Levels returns the valid log levels to hook.

type Option

type Option func(h *Hook)

Option are sentry options.

func WithTags

func WithTags(tags map[string]string) Option

WithTags adds tags.

Jump to

Keyboard shortcuts

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