Documentation ¶
Index ¶
- Constants
- func CaptureException(err error, tags map[string]string)
- func CaptureMessage(msg string, tags map[string]string)
- func InitSentry(disabled bool, commit string)
- func Reraise(err any, tags map[string]string)
- type NexusLogger
- func (nl *NexusLogger) CaptureError(msg string, err error, args ...interface{})
- func (nl *NexusLogger) CaptureFatal(msg string, err error, args ...interface{})
- func (nl *NexusLogger) CaptureFatalAndPanic(msg string, err error, args ...interface{})
- func (nl *NexusLogger) CaptureInfo(msg string, args ...interface{})
- func (nl *NexusLogger) CaptureWarn(msg string, args ...interface{})
- func (nl *NexusLogger) Fatal(msg string, err error, args ...interface{})
- func (nl *NexusLogger) FatalAndPanic(msg string, err error, args ...interface{})
- func (nl *NexusLogger) Reraise(args ...any)
- func (nl *NexusLogger) SetTags(tags Tags)
- type SentryClient
- type Tags
Constants ¶
View Source
const LevelFatal = slog.Level(12)
Variables ¶
This section is empty.
Functions ¶
func CaptureException ¶
func CaptureMessage ¶
func InitSentry ¶
Types ¶
type NexusLogger ¶
func NewNexusLogger ¶
func NewNexusLogger(logger *slog.Logger, tags Tags) *NexusLogger
func NewNoOpLogger ¶
func NewNoOpLogger() *NexusLogger
func (*NexusLogger) CaptureError ¶
func (nl *NexusLogger) CaptureError(msg string, err error, args ...interface{})
CaptureError logs an error and sends it to sentry.
func (*NexusLogger) CaptureFatal ¶
func (nl *NexusLogger) CaptureFatal(msg string, err error, args ...interface{})
CaptureFatal logs an error at the fatal level and sends it to sentry.
func (*NexusLogger) CaptureFatalAndPanic ¶
func (nl *NexusLogger) CaptureFatalAndPanic(msg string, err error, args ...interface{})
CaptureFatalAndPanic logs an error at the fatal level and sends it to sentry. It then panics.
func (*NexusLogger) CaptureInfo ¶
func (nl *NexusLogger) CaptureInfo(msg string, args ...interface{})
CaptureInfo logs an info message and sends it to sentry.
func (*NexusLogger) CaptureWarn ¶
func (nl *NexusLogger) CaptureWarn(msg string, args ...interface{})
CaptureWarn logs a warning and sends it to sentry.
func (*NexusLogger) Fatal ¶
func (nl *NexusLogger) Fatal(msg string, err error, args ...interface{})
Fatal logs an error at the fatal level.
func (*NexusLogger) FatalAndPanic ¶
func (nl *NexusLogger) FatalAndPanic(msg string, err error, args ...interface{})
FatalAndPanic logs an error at the fatal level and panics.
func (*NexusLogger) Reraise ¶
func (nl *NexusLogger) Reraise(args ...any)
Reraise is used to capture unexpected panics with sentry and reraise them.
func (*NexusLogger) SetTags ¶
func (nl *NexusLogger) SetTags(tags Tags)
type SentryClient ¶
Click to show internal directories.
Click to hide internal directories.