Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var FindExceptionsOnStacktrace = false
Tells if Sherlog should scan stacktrace for exceptions (may slow down performance)
View Source
var RegexpMappers = make(map[string]RegexpMapper)
Holds all regexp based mappers registered in Sherlog (used for parsing user configuration)
View Source
var RegisteredMappers = make(map[string]Mapper)
Holds all the mappers registered in Sherlog
Functions ¶
Types ¶
type Config ¶
type Config struct { // Sets the base of this configuration to inherit its properties From string // Holds the entry pattern Entry string // Holds the exception pattern Exception string // Holds the stacktrace pattern Stacktrace string }
Struct that represents a configuration for mapping log entries
type Mapper ¶
type Mapper interface { // Maps all string from the input channel to an Entry structure and sends them to the pipeline channel Map(in <-chan *domain.Line, pipeline chan<- *domain.Entry) }
Interface that defines a mapper Basically, a mapper is responsible for grabbing strings from a channel, mapping it to an Entry structure and passing it to the pipeline channel
type RegexpMapper ¶
type RegexpMapper struct { // The pattern for the entry, the captured groups will be bound to the Entry object Entry *regexp.Regexp // The pattern for exception names Exception *regexp.Regexp // The pattern for the stacktrace, while this pattern occurs in subsequent inputs from the channel, the input will // be attached to the last entry as a stacktrace element Stacktrace *regexp.Regexp }
Struct that defines a mapper that uses regular expression
var JavaMapper RegexpMapper
A Java mapper for use as a base
var WildflyMapper RegexpMapper
A mapper for Wildfly logs
Click to show internal directories.
Click to hide internal directories.