Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logger ¶
Logger extends a logrus logger by providing path-like names.
func NewPlainLogger ¶ added in v1.0.2
NewPlainLogger creates a Logger without a SentryManager.
func (*Logger) Recovery ¶ added in v1.1.0
func (l *Logger) Recovery() gin.HandlerFunc
type LoggerMaker ¶
type SentryConfig ¶
type SentryManager ¶
type SentryManager struct {
// contains filtered or unexported fields
}
SentryManager is a struct that issues loggers tied back to a central sentry.Hub instance.
func NewSentryManager ¶
func NewSentryManager(config *SentryConfig, logLevel string) (*SentryManager, error)
NewSentryManager creates a SentryManager with a logLevel output minimum.
func (*SentryManager) Fire ¶
func (m *SentryManager) Fire(lEntry *logrus.Entry) error
Fire implements the logrus.Hook interface. Log entries will be logged to Sentry.
func (*SentryManager) Levels ¶
func (m *SentryManager) Levels() []logrus.Level
Levels implements the logrus.Hook interface.
func (*SentryManager) NewLogger ¶
func (m *SentryManager) NewLogger(name string) *Logger
NewLogger returns a Logger with the given name, linked to this SentryManager object
func (*SentryManager) WithRequestContext ¶
func (m *SentryManager) WithRequestContext(ctx *gin.Context)
WithRequestContext issues a new sentry.Hub and sets the Hub's current request to req. To be used in gin.Use as middleware.
Click to show internal directories.
Click to hide internal directories.