Documentation ¶
Index ¶
- Variables
- func ContextWithoutLogging(parent context.Context) context.Context
- func IsContextWithoutLogging(ctx context.Context) bool
- type Writer
- func (w *Writer) BeginMessage(config golog.Config, t time.Time, level golog.Level, prefix, text string)
- func (w *Writer) CommitMessage()
- func (w *Writer) String() string
- func (w *Writer) WriteBool(val bool)
- func (w *Writer) WriteError(val error)
- func (w *Writer) WriteFloat(val float64)
- func (w *Writer) WriteInt(val int64)
- func (w *Writer) WriteJSON(val []byte)
- func (w *Writer) WriteKey(key string)
- func (w *Writer) WriteNil()
- func (w *Writer) WriteSliceEnd()
- func (w *Writer) WriteSliceKey(key string)
- func (w *Writer) WriteString(val string)
- func (w *Writer) WriteUUID(val [16]byte)
- func (w *Writer) WriteUint(val uint64)
- type WriterConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // UnknownLevel will be used if a golog.Level // can't be mapped to a sentry.LevelError. UnknownLevel = sentry.LevelError FlushTimeout time.Duration = 3 * time.Second )
Functions ¶
func ContextWithoutLogging ¶
ContextWithoutLogging returns a new context with Sentry logging disabled for all levels.
func IsContextWithoutLogging ¶
IsContextWithoutLogging returns true if the passed context was returned from ContextWithoutLogging, which means Sentry logging disabled for all levels.
Types ¶
type Writer ¶
type Writer struct {
// contains filtered or unexported fields
}
func (*Writer) BeginMessage ¶
func (*Writer) CommitMessage ¶
func (w *Writer) CommitMessage()
func (*Writer) WriteError ¶
func (*Writer) WriteFloat ¶
func (*Writer) WriteSliceEnd ¶
func (w *Writer) WriteSliceEnd()
func (*Writer) WriteSliceKey ¶
func (*Writer) WriteString ¶
type WriterConfig ¶
type WriterConfig struct {
// contains filtered or unexported fields
}
func NewWriterConfig ¶
func NewWriterConfig(hub *sentry.Hub, format *golog.Format, filter golog.LevelFilter, valsAsMsg bool, extra map[string]any) *WriterConfig
NewWriterConfig returns a new WriterConfig for a sentry.Hub. Any values passed as extra will be added to every log messsage.
func (*WriterConfig) FlushUnderlying ¶
func (c *WriterConfig) FlushUnderlying()
func (*WriterConfig) WriterForNewMessage ¶
Click to show internal directories.
Click to hide internal directories.