Documentation
¶
Index ¶
- Constants
- Variables
- func IsLoggingSkipped(e *logrus.Entry) bool
- func NewDefaultMaskLogHook() logrus.Hook
- func SkipLogging(e *logrus.Entry)
- type Factory
- type FormatHook
- type Level
- type Logger
- type LoggingSkippable
- type MaskPattern
- type PlainMaskPattern
- type RegexMaskPattern
- type StackHook
- type WriterHook
Constants ¶
View Source
const DefaultLevel = LevelWarn
View Source
const KeySkipLogging = "__authgear_skip_logging"
Variables ¶
View Source
var Null = logrus.NewEntry(&logrus.Logger{Out: ioutil.Discard, Formatter: nullFormatter{}})
View Source
var StackHookLevels = []logrus.Level{ logrus.PanicLevel, logrus.FatalLevel, logrus.ErrorLevel, }
View Source
var WriterHookLevels = []logrus.Level{ logrus.PanicLevel, logrus.FatalLevel, logrus.ErrorLevel, logrus.WarnLevel, logrus.InfoLevel, logrus.DebugLevel, logrus.TraceLevel, }
Functions ¶
func IsLoggingSkipped ¶
func NewDefaultMaskLogHook ¶
func SkipLogging ¶
Types ¶
type FormatHook ¶
type FormatHook struct { MaskPatterns []MaskPattern Mask string }
func (*FormatHook) Levels ¶
func (h *FormatHook) Levels() []logrus.Level
type LoggingSkippable ¶
type LoggingSkippable interface{ SkipLogging() bool }
type MaskPattern ¶
type PlainMaskPattern ¶
type PlainMaskPattern struct {
Pattern string
}
func NewPlainMaskPattern ¶
func NewPlainMaskPattern(s string) PlainMaskPattern
type RegexMaskPattern ¶
func NewRegexMaskPattern ¶
func NewRegexMaskPattern(expr string) RegexMaskPattern
type StackHook ¶
type StackHook struct{}
StackHook attaches call stack to entries with level >= error.
type WriterHook ¶
WriterHook replaces logger.Out. Since logger.Out works with logger.Formatter, We have to replicate the behavior here. The reason for WriterHook to exist is to call our Ignore() to filter out unwanted entry.
func NewWriterHook ¶
func NewWriterHook(w io.Writer) *WriterHook
func (*WriterHook) Levels ¶
func (h *WriterHook) Levels() []logrus.Level
Click to show internal directories.
Click to hide internal directories.