Skip to content

Commit

Permalink
add some info level logs (#102)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhulijian1 authored Mar 24, 2020
1 parent 8c3d4e8 commit f6cc7f3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion event/event_system.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ func (dis *Dispatcher) DispatchEvent(event *Event) error {
}
if matched {
for _, listener := range listeners {
openlogging.GetLogger().Debugf("event generated for %s", regKey)
openlogging.GetLogger().Infof("event generated for %s", regKey)
go listener.Event(event)
}
}
Expand Down
4 changes: 3 additions & 1 deletion source/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ func (m *Manager) updateEvent(e *event.Event) error {
if e == nil || e.EventSource == "" || e.Key == "" {
return errors.New("nil or invalid event supplied")
}
openlogging.GetLogger().Debugf("event received %s", e)
openlogging.GetLogger().Infof("event received %s", e)
switch e.EventType {
case event.Create, event.Update:
m.configMapMux.Lock()
Expand All @@ -360,6 +360,8 @@ func (m *Manager) updateEvent(e *event.Event) error {
if prioritySrc != nil && prioritySrc.GetSourceName() == sourceName {
// if event generated from less priority source then ignore
m.configMapMux.Unlock()
openlogging.GetLogger().Infof("the event source %s's priority is less then %s's, ignore",
e.EventSource, sourceName)
return nil
}
m.ConfigurationMap[e.Key] = e.EventSource
Expand Down
4 changes: 4 additions & 0 deletions source/remote/kie/kie_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ func NewKieSource(ci *archaius.RemoteInfo) (source.ConfigSource, error) {
} else {
ks.RefreshInterval = time.Second * time.Duration(ci.RefreshInterval)
}
openlogging.Info("new kie source", openlogging.WithTags(
openlogging.Tags{
"labels": ci.DefaultDimension,
}))
return ks, nil
}

Expand Down

0 comments on commit f6cc7f3

Please sign in to comment.