Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var DefaultLogger = slog.New(slog.NewTextHandler(os.Stdout, nil))
DefaultLogger is the logger that WebKit uses to log HTTP Requests and info messages throughout the application.
Functions ¶
Types ¶
type LocalHandler ¶
type LocalHandler struct {
// contains filtered or unexported fields
}
LocalHandler is a handler that logs to the console in a human-readable format for local development environments.
func NewLocalHandler ¶
func NewLocalHandler(writer io.Writer, opts *slog.HandlerOptions, prefix string) *LocalHandler
NewLocalHandler returns a new local handler with the given options.
func (*LocalHandler) Enabled ¶
Enabled returns whether logging is enabled for the given level in the context.
type SentryEventIdentityModifier ¶
type SentryEventIdentityModifier struct{}
SentryEventIdentityModifier is a sentry event modifier that simply passes through the event.
func (*SentryEventIdentityModifier) ApplyToEvent ¶
func (m *SentryEventIdentityModifier) ApplyToEvent(event *sentry.Event, hint *sentry.EventHint) *sentry.Event
ApplyToEvent simply returns the event (ignoring the hint).
type SentryHook ¶
type SentryHook struct {
// contains filtered or unexported fields
}
SentryHook implements logrus.Hook to send errors to sentry
func NewSentryHook ¶
func NewSentryHook(client *sentry.Client) SentryHook
NewSentryHook creates a sentry hook for logrus given a sentry client
func (SentryHook) Fire ¶
func (h SentryHook) Fire(e *logrus.Entry) error
Fire is an event handler for logrus. This is a part of logrus.Hook. Taken from: https://github.com/getsentry/sentry-go/issues/43
func (SentryHook) Levels ¶
func (h SentryHook) Levels() []logrus.Level
Levels returns the levels this hook is enabled for. This is a part of logrus.Hook.