Skip to content

Commit

Permalink
refactor(TripActions): Add logging.
Browse files Browse the repository at this point in the history
  • Loading branch information
binh-dam-ibigroup committed Dec 9, 2024
1 parent bdf494a commit fb64da8
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,10 @@ public static boolean segmentMatchesAction(Segment segment, SegmentAction action
}

public void handleSegmentAction(Segment segment, OtpUser otpUser) {
LOG.info("Looking for segment action: start: {}, end: {}", segment.start, segment.end);
SegmentAction action = getSegmentAction(segment);
if (action != null) {
LOG.info("Found segment action: {}", action.id);
Interaction interaction = null;
try {
Class<?> interactionClass = Class.forName(action.trigger);
Expand All @@ -84,6 +86,7 @@ public void handleSegmentAction(Segment segment, OtpUser otpUser) {

public void handleSegmentAction(Step step, List<Step> steps, OtpUser user) {
int stepIndex = steps.indexOf(step);
LOG.info("Looking for segment actions: step {}/{}", stepIndex, steps.size());
if (stepIndex >= 0 && stepIndex < steps.size() - 1) {
Step stepAfter = steps.get(stepIndex + 1);
Segment segment = new Segment(
Expand Down

0 comments on commit fb64da8

Please sign in to comment.