@@ -2,7 +2,6 @@ package eventRouting
22
33import (
44 "fmt"
5- "os"
65 "sort"
76 "strings"
87 "sync"
@@ -12,8 +11,6 @@ import (
1211 fevents "bitbucket.org/mcplusa-ondemand/firehouse-to-sumologic/events"
1312 "bitbucket.org/mcplusa-ondemand/firehouse-to-sumologic/sumoCFFirehose"
1413 "github.com/Sirupsen/logrus"
15- "github.com/cloudfoundry-community/firehose-to-syslog1/extrafields"
16- "github.com/cloudfoundry-community/firehose-to-syslog1/logging"
1714 "github.com/cloudfoundry/sonde-go/events"
1815)
1916
@@ -24,7 +21,6 @@ type EventRouting struct {
2421 mutex * sync.Mutex
2522 sLAppender sumoCFFirehose.SumoCFFirehose //**
2623 //*log logging.Logging
27- ExtraFields map [string ]string
2824}
2925
3026func NewEventRouting (caching caching.Caching , sLAppender sumoCFFirehose.SumoCFFirehose ) * EventRouting {
@@ -34,8 +30,7 @@ func NewEventRouting(caching caching.Caching, sLAppender sumoCFFirehose.SumoCFFi
3430 selectedEventsCount : make (map [string ]uint64 ),
3531 sLAppender : sLAppender , //**
3632 //* log: logging,
37- mutex : & sync.Mutex {},
38- ExtraFields : make (map [string ]string ),
33+ mutex : & sync.Mutex {},
3934 }
4035}
4136
@@ -70,7 +65,6 @@ func (e *EventRouting) RouteEvent(msg *events.Envelope) {
7065
7166 event .AnnotateWithEnveloppeData (msg )
7267
73- event .AnnotateWithMetaData (e .ExtraFields )
7468 if _ , hasAppId := event .Fields ["cf_app_id" ]; hasAppId {
7569 event .AnnotateWithAppData (e .CachingClient )
7670 }
@@ -108,16 +102,6 @@ func (e *EventRouting) SetupEventRouting(wantedEvents string) error {
108102 return nil
109103}
110104
111- func (e * EventRouting ) SetExtraFields (extraEventsString string ) {
112- // Parse extra fields from cmd call
113- extraFields , err := extrafields .ParseExtraFields (extraEventsString )
114- if err != nil {
115- logging .LogError ("Error parsing extra fields: " , err )
116- os .Exit (1 )
117- }
118- e .ExtraFields = extraFields
119- }
120-
121105func (e * EventRouting ) isAuthorizedEvent (wantedEvent string ) bool {
122106 for _ , authorizeEvent := range events .Envelope_EventType_name {
123107 if wantedEvent == authorizeEvent {
0 commit comments