@@ -566,9 +566,16 @@ pub async fn get_gateway_priority(
566566 let ( script, priority_logic_tag) = get_script ( macc. clone ( ) , priority_logic_script_m) . await ;
567567 let result = evaluate_script ( script. clone ( ) , priority_logic_tag. clone ( ) ) . await ;
568568
569+ logger:: info!(
570+ tag = "PRIORITY_LOGIC_EXECUTION_RESULT" ,
571+ "MerchantId: {:?} , Result: {:?}" ,
572+ macc. merchantId. clone( ) ,
573+ result
574+ ) ;
575+
569576 match result {
570577 EvaluationResult :: PLResponse ( gws, pl_data, logs, status) => {
571- logger:: info !(
578+ logger:: debug !(
572579 tag = "PRIORITY_LOGIC_EXECUTION_" ,
573580 "MerchantId: {:?} , Gateways: {:?}, Logs: {:?}" ,
574581 macc. merchantId. clone( ) ,
@@ -585,7 +592,7 @@ pub async fn get_gateway_priority(
585592 }
586593 }
587594 EvaluationResult :: EvaluationError ( priority_logic_data, err) => {
588- logger:: info !(
595+ logger:: debug !(
589596 tag = "PRIORITY_LOGIC_EXECUTION_FAILURE" ,
590597 "MerchantId: {:?}, Error: {:?}" ,
591598 macc. merchantId,
@@ -598,7 +605,7 @@ pub async fn get_gateway_priority(
598605 match retry_result {
599606 EvaluationResult :: PLResponse ( retry_gws, retry_pl_data, logs, status) => {
600607 let tag = format ! ( "PRIORITY_LOGIC_EXECUTION_RETRY_{}" , status) ;
601- logger:: info !(
608+ logger:: debug !(
602609 tag = %tag,
603610 "MerchantId: {:?} , Gateways: {:?}, Logs: {:?}" ,
604611 macc. merchantId,
@@ -615,7 +622,7 @@ pub async fn get_gateway_priority(
615622 }
616623 }
617624 EvaluationResult :: EvaluationError ( retry_pl_data, err) => {
618- logger:: info !(
625+ logger:: debug !(
619626 tag = "PRIORITY_LOGIC_EXECUTION_RETRY_FAILURE" ,
620627 "MerchantId: {:?} , Error: {:?}" ,
621628 macc. merchantId,
@@ -664,7 +671,7 @@ pub async fn get_gateway_priority(
664671 None => default_gateway_priority_logic_output ( ) ,
665672 Some ( t) => {
666673 if t. is_empty ( ) {
667- logger:: info !(
674+ logger:: debug !(
668675 tag = "gatewayPriority" ,
669676 "gatewayPriority for merchant: {:?} is empty." ,
670677 macc. merchantId
@@ -676,15 +683,15 @@ pub async fn get_gateway_priority(
676683 . map ( |s| s. trim ( ) . to_string ( ) )
677684 . filter ( |s| !s. is_empty ( ) )
678685 . collect :: < Vec < _ > > ( ) ;
679- logger:: info !(
686+ logger:: debug !(
680687 tag = "gatewayPriority" ,
681688 "gatewayPriority for merchant: {:?} listOfGateway: {:?}" ,
682689 macc. merchantId,
683690 list_of_gateway
684691 ) ;
685692 match list_of_gateway. as_slice ( ) {
686693 [ ] => {
687- logger:: info !(
694+ logger:: debug !(
688695 tag = "gatewayPriority emptyList" ,
689696 "Can't get gatewayPriority for merchant: {:?} . Input: {:?}" ,
690697 macc. merchantId,
@@ -693,7 +700,7 @@ pub async fn get_gateway_priority(
693700 default_gateway_priority_logic_output ( )
694701 }
695702 res => {
696- logger:: info !(
703+ logger:: debug !(
697704 tag = "gatewayPriority decoding" ,
698705 "Decoded successfully. Input: {:?} output: {:?}" ,
699706 t,
@@ -827,7 +834,7 @@ async fn get_priority_logic_script_from_tenant_config(
827834 Some ( tenant_config) => {
828835 match ( tenant_config. filterDimension , tenant_config. filterGroupId ) {
829836 ( Some ( filter_dimension) , Some ( filter_group_id) ) => {
830- logger:: info !(
837+ logger:: debug !(
831838 tag = "getPriorityLogicScriptFromTenantConfig" ,
832839 "Filter dimension found: {:?}" ,
833840 filter_dimension
@@ -841,7 +848,7 @@ async fn get_priority_logic_script_from_tenant_config(
841848 . await
842849 }
843850 _ => {
844- logger:: info !(
851+ logger:: debug !(
845852 tag = "getPriorityLogicScriptFromTenantConfig" ,
846853 "Filter dimension and filter groupId are not present. Proceeding with default tenant config value."
847854 ) ;
@@ -851,7 +858,7 @@ async fn get_priority_logic_script_from_tenant_config(
851858 }
852859 None => {
853860 let tenant_account_id = macc. tenantAccountId . clone ( ) . unwrap_or_default ( ) ;
854- logger:: info !(
861+ logger:: debug !(
855862 tag = "getPriorityLogicScriptFromTenantConfig" ,
856863 "Tenant Config not found for tenant account id {}" ,
857864 tenant_account_id
@@ -875,7 +882,7 @@ async fn get_pl_by_filter_dimension(
875882 get_pl_by_merchant_category_code ( macc, filter_group_id, config_value) . await
876883 }
877884 _ => {
878- logger:: info !(
885+ logger:: debug !(
879886 tag = "getPLByFilterDimension" ,
880887 "Filter dimension is not supported. Proceeding with default tenant config value."
881888 ) ;
@@ -898,14 +905,14 @@ async fn get_pl_by_merchant_category_code(
898905 . await
899906 {
900907 Some ( tenant_config_filter) => {
901- logger:: info !(
908+ logger:: debug !(
902909 tag = "getPLByMerchantCategoryCode" ,
903910 "Proceeding with tenant config filter priority logic."
904911 ) ;
905912 decode_tenant_pl_config ( tenant_config_filter. configValue , macc) . await
906913 }
907914 None => {
908- logger:: info !(
915+ logger:: debug !(
909916 tag = "getPLByMerchantCategoryCode" ,
910917 "Unable to find tenant config filter for groupId {:?} and dimension value {}" ,
911918 filter_group_id,
@@ -916,7 +923,7 @@ async fn get_pl_by_merchant_category_code(
916923 }
917924 }
918925 None => {
919- logger:: info !(
926+ logger:: debug !(
920927 tag = "getPLByMerchantCategoryCode" ,
921928 "Merchant category code is not present for merchantId {:?}" ,
922929 macc. merchantId
@@ -932,7 +939,7 @@ async fn decode_tenant_pl_config(
932939) -> ( String , Option < String > ) {
933940 match utils:: either_decode_t :: < TenantPLConfig > ( & config_value) {
934941 Ok ( tenant_pl_config) => {
935- logger:: info !(
942+ logger:: debug !(
936943 tag = "decodeTenantPLConfig" ,
937944 "Tenant Priority Logic Config decoded successfully with name: {}" ,
938945 tenant_pl_config. name
@@ -1014,7 +1021,7 @@ pub async fn handle_fallback_logic(
10141021 . await ;
10151022 match fallback_result {
10161023 EvaluationResult :: PLResponse ( gws, pl_data, logs, status) => {
1017- logger:: info !(
1024+ logger:: debug !(
10181025 tag = "FALLBACK_PRIORITY_LOGIC_EXECUTION_" ,
10191026 "MerchantId: {:?} , Gateways: {:?}, Logs: {:?}" ,
10201027 macc. merchantId. clone( ) ,
@@ -1032,7 +1039,7 @@ pub async fn handle_fallback_logic(
10321039 }
10331040 }
10341041 EvaluationResult :: EvaluationError ( priority_logic_data, err) => {
1035- logger:: info !(
1042+ logger:: debug !(
10361043 tag = "FALLBACK_PRIORITY_LOGIC_EXECUTION_FAILURE" ,
10371044 "MerchantId: {:?} , Error: {:?}" ,
10381045 macc. merchantId,
0 commit comments