@@ -686,8 +686,8 @@ validate_recurrent_terms(RecurrentTerms, PaymentTool) ->
686686 _ =
687687 case hg_payment_tool :has_any_payment_method (PaymentTool , PMs ) of
688688 false ->
689- logger :info (" PaymentTool: ~p " , [PaymentTool ]),
690- logger :info (" RecurrentPaymentMethods: ~p " , [PMs ]),
689+ logger :notice (" PaymentTool: ~p " , [PaymentTool ]),
690+ logger :notice (" RecurrentPaymentMethods: ~p " , [PMs ]),
691691 throw_invalid_request (<<" Invalid payment method" >>);
692692 true ->
693693 ok
@@ -794,7 +794,7 @@ log_route_choice_meta(#{choice_meta := undefined}, _Revision) ->
794794 ok ;
795795log_route_choice_meta (#{choice_meta := ChoiceMeta }, Revision ) ->
796796 Metadata = hg_routing :get_logger_metadata (ChoiceMeta , Revision ),
797- logger :log (info , " Routing decision made" , #{routing => Metadata }).
797+ logger :log (notice , " Routing decision made" , #{routing => Metadata }).
798798
799799maybe_log_misconfigurations ({misconfiguration , _ } = Error ) ->
800800 {Format , Details } = hg_routing :prepare_log_message (Error ),
@@ -810,14 +810,14 @@ log_rejected_routes(all, Routes, VS) ->
810810log_rejected_routes (limit_misconfiguration , Routes , _VS ) ->
811811 ? LOG_MD (warning , " Limiter hold error caused route candidates to be rejected: ~p " , [Routes ]);
812812log_rejected_routes (limit_overflow , Routes , _VS ) ->
813- ? LOG_MD (info , " Limit overflow caused route candidates to be rejected: ~p " , [Routes ]);
813+ ? LOG_MD (notice , " Limit overflow caused route candidates to be rejected: ~p " , [Routes ]);
814814log_rejected_routes (adapter_unavailable , Routes , _VS ) ->
815- ? LOG_MD (info , " Adapter unavailability caused route candidates to be rejected: ~p " , [Routes ]);
815+ ? LOG_MD (notice , " Adapter unavailability caused route candidates to be rejected: ~p " , [Routes ]);
816816log_rejected_routes (provider_conversion_is_too_low , Routes , _VS ) ->
817- ? LOG_MD (info , " Lacking conversion of provider caused route candidates to be rejected: ~p " , [Routes ]);
817+ ? LOG_MD (notice , " Lacking conversion of provider caused route candidates to be rejected: ~p " , [Routes ]);
818818log_rejected_routes (forbidden , Routes , VS ) ->
819- ? LOG_MD (info , " Rejected routes found for varset: ~p " , [VS ]),
820- ? LOG_MD (info , " Rejected routes found, rejected routes: ~p " , [Routes ]);
819+ ? LOG_MD (notice , " Rejected routes found for varset: ~p " , [VS ]),
820+ ? LOG_MD (notice , " Rejected routes found, rejected routes: ~p " , [Routes ]);
821821log_rejected_routes (_ , _Routes , _VS ) ->
822822 ok .
823823
@@ -1932,7 +1932,7 @@ process_risk_score(Action, St) ->
19321932 ok ->
19331933 {next , {Events , hg_machine_action :set_timeout (0 , Action )}};
19341934 {error , risk_score_is_too_high = Reason } ->
1935- logger :info (" No route found, reason = ~p , varset: ~p " , [Reason , VS1 ]),
1935+ logger :notice (" No route found, reason = ~p , varset: ~p " , [Reason , VS1 ]),
19361936 handle_choose_route_error (Reason , Events , St , Action )
19371937 end .
19381938
@@ -2030,15 +2030,15 @@ handle_choose_route_error(Error, Events, St, Action) ->
20302030
20312031% % NOTE See damsel payproc errors (proto/payment_processing_errors.thrift) for no route found
20322032
2033- construct_routing_failure ({rejected_routes , {forbidden , RejectedRoutes }}) ->
2034- construct_routing_failure ([forbidden ], genlib :format (RejectedRoutes ));
20352033construct_routing_failure ({rejected_routes , {SubCode , RejectedRoutes }}) when
20362034 SubCode =:= limit_misconfiguration orelse
20372035 SubCode =:= limit_overflow orelse
20382036 SubCode =:= adapter_unavailable orelse
20392037 SubCode =:= provider_conversion_is_too_low
20402038->
20412039 construct_routing_failure ([rejected , SubCode ], genlib :format (RejectedRoutes ));
2040+ construct_routing_failure ({rejected_routes , {_SubCode , RejectedRoutes }}) ->
2041+ construct_routing_failure ([forbidden ], genlib :format (RejectedRoutes ));
20422042construct_routing_failure ({misconfiguration = Code , Details }) ->
20432043 construct_routing_failure ([unknown , {unknown_error , atom_to_binary (Code )}], genlib :format (Details ));
20442044construct_routing_failure (Code = risk_score_is_too_high ) ->
@@ -2336,7 +2336,7 @@ process_failure({payment, Step} = Activity, Events, Action, Failure, St, _Refund
23362336 Target = get_target (St ),
23372337 case check_retry_possibility (Target , Failure , St ) of
23382338 {retry , Timeout } ->
2339- _ = logger :info (" Retry session after transient failure, wait ~p " , [Timeout ]),
2339+ _ = logger :notice (" Retry session after transient failure, wait ~p " , [Timeout ]),
23402340 {SessionEvents , SessionAction } = retry_session (Action , Target , Timeout ),
23412341 {next , {Events ++ SessionEvents , SessionAction }};
23422342 fatal ->
@@ -3273,7 +3273,7 @@ log_cascade_attempt_context(
32733273 # domain_PaymentsServiceTerms {attempt_limit = AttemptLimit },
32743274 # st {routes = AttemptedRoutes }
32753275) ->
3276- ? LOG_MD (info , " Cascade context: merchant payment terms' attempt limit '~p ', attempted routes: ~p " , [
3276+ ? LOG_MD (notice , " Cascade context: merchant payment terms' attempt limit '~p ', attempted routes: ~p " , [
32773277 AttemptLimit , AttemptedRoutes
32783278 ]).
32793279
0 commit comments