Skip to content

Commit

Permalink
Merge pull request #1 from tomazzinko/patch-1
Browse files Browse the repository at this point in the history
Adds debug line to aggreagte_root
  • Loading branch information
kieranajp authored Mar 8, 2017
2 parents a5aa37c + d3c5700 commit 16a2728
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions aggregate_root.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ func (r *AggregateRootBased) GetUncommittedEvents() []*DomainMessage {

func (r *AggregateRootBased) Apply(event DomainEvent) {
t := reflection.TypeOf(event)
log.Debugf("source: %+v; MethodName: %+v; event: %+v", r.source, fmt.Sprintf("When%s", t.Name()), event)
reflection.CallMethod(r.source, fmt.Sprintf("When%s", t.Name()), event)
log.Debugf("Event %s applied", t.Name())
}
Expand Down

0 comments on commit 16a2728

Please sign in to comment.