diff --git a/gbus/bus.go b/gbus/bus.go index 4ba97df..2e4d43e 100644 --- a/gbus/bus.go +++ b/gbus/bus.go @@ -364,7 +364,6 @@ func (b *DefaultBus) GetHealth() HealthCard { DbConnected: dbConnected, RabbitBackPressure: b.backpressure, RabbitConnected: b.amqpConnected, - } } diff --git a/gbus/saga/instance.go b/gbus/saga/instance.go index 4619937..7435361 100644 --- a/gbus/saga/instance.go +++ b/gbus/saga/instance.go @@ -3,7 +3,7 @@ package saga import ( "database/sql" "fmt" - "log" + "github.com/sirupsen/logrus" "reflect" "time" @@ -38,16 +38,18 @@ func (si *Instance) invoke(exchange, routingKey string, invocation gbus.Invocati params := make([]reflect.Value, 0) params = append(params, reflect.ValueOf(invocation), valueOfMessage) method := reflectedVal.MethodByName(methodName) - log.Printf(" invoking method %v on saga instance %v", methodName, si.ID) + invocation.Log().WithFields(logrus.Fields{ + "method_name": methodName, "saga_id": si.ID, + }).Info("invoking method on saga") returns := method.Call(params) val := returns[0] if !val.IsNil() { return val.Interface().(error) } - - log.Printf(" saga instance %v invoked", si.ID) - + invocation.Log().WithFields(logrus.Fields{ + "method_name": methodName, "saga_id": si.ID, + }).Info("saga instance invoked") } return nil