Documentation ¶
Index ¶
Constants ¶
View Source
const ( FieldCorrelationID = "correlationID" FieldNamespace = "namespace" FieldService = "service" FieldAuthName = "authName" FieldAuthID = "authID" FieldAuthType = "authType" FieldNewRelicTxn = "newRelicTransaction" )
Default key names for the metadata fields
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CFFormatter ¶
type CFFormatter struct { // TimestampFormat sets the format used for marshaling timestamps. TimestampFormat string }
CFFormatter formats logs into parsable json
type Hook ¶
type Hook struct { AppName string Prefix string AppField string FunctionField string SourceField string Skip int Formatter func(file, function string, line int) (string, string) // contains filtered or unexported fields }
Hook define a Logrus hook
type NewRelicLogrusHook ¶
NewRelicLogrusHook logrus hook for new relic
func NewNewRelicLogrusHook ¶
func NewNewRelicLogrusHook(app newrelic.Application, levels []logrus.Level) *NewRelicLogrusHook
NewNewRelicLogrusHook create NewRelic Logrus hook
func (*NewRelicLogrusHook) Fire ¶
func (n *NewRelicLogrusHook) Fire(entry *logrus.Entry) error
Fire fire logrus event hook
func (*NewRelicLogrusHook) Levels ¶
func (n *NewRelicLogrusHook) Levels() []logrus.Level
Levels return levels for hook
Click to show internal directories.
Click to hide internal directories.