File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,25 @@ import (
2323 "go.uber.org/zap/zapcore"
2424)
2525
26+ // TypeKey is the default key to define log types.
27+ //
28+ // Different log types can be handled by different cores, the `typedLoggerCore`
29+ // allows for choosing a different core based on a key/value pair. TypeKey
30+ // is the default key for using the typedLoggerCore.
31+ //
32+ // It should be used in conjunction with the defined types on this package.
33+ const TypeKey = "log.type"
34+
35+ // DefaultType is the default log type. If `log.type` is not defined a log
36+ // entry is considered of type `DefaultType`. Those log entries should follow
37+ // the default logging configuration.
38+ const DefaultType = "default"
39+
40+ // EventType is the type for log entries containing event data.
41+ // Beats and Elastic-Agent use this with the `typedLoggerCore` to direct
42+ // those log entries to a different file.
43+ const EventType = "event"
44+
2645// typedLoggerCore takes two cores and directs logs entries to one of them
2746// with the value of the field defined by the pair `key` and `value`
2847//
You can’t perform that action at this time.
0 commit comments