diff --git a/FeatureToggle/__init__.py b/FeatureToggle/__init__.py index ef51005..9666f83 100644 --- a/FeatureToggle/__init__.py +++ b/FeatureToggle/__init__.py @@ -106,7 +106,6 @@ def update_cache(data: Dict[str, Any]) -> None: 'To update cache Feature Toggles class needs to be initialised' ) - LOGGER.info(f'Updating the cache data: {data}') try: FeatureToggles.__cache.set( consts.FEATURES_URL, pickle.dumps(data) @@ -119,7 +118,6 @@ def update_cache(data: Dict[str, Any]) -> None: error_msg = f'Unknown Exception occurred while updating the redis cache: {str(err)}' LOGGER.info(error_msg) raise Exception(error_msg) - LOGGER.info(f'[Feature Toggles] Cache Updated') @staticmethod def __get_unleash_client(): @@ -180,8 +178,6 @@ def is_enabled_for_domain(feature_name: str, (bool): True if Feature is enabled else False """ feature_toggles = FeatureToggles.fetch_feature_toggles() - LOGGER.info(f"Enable_for_domain_FT_cache_info: " - f"{FeatureToggles.fetch_feature_toggles.__wrapped__.cache_info()}") return domain_name in feature_toggles.get(feature_name, {}).get('domain_names', []) @staticmethod @@ -196,8 +192,6 @@ def is_enabled_for_partner(feature_name: str, (bool): True if Feature is enabled else False """ feature_toggles = FeatureToggles.fetch_feature_toggles() - LOGGER.info(f"Enable_for_partner_FT_cache_info: " - f"{FeatureToggles.fetch_feature_toggles.__wrapped__.cache_info()}") return partner_name in feature_toggles.get(feature_name, {}).get('partner_names', []) @staticmethod @@ -212,8 +206,6 @@ def is_enabled_for_business(feature_name: str, (bool): True if Feature is enabled else False """ feature_toggles = FeatureToggles.fetch_feature_toggles() - LOGGER.info(f"Enable_for_business_FT_cache_info: " - f"{FeatureToggles.fetch_feature_toggles.__wrapped__.cache_info()}") return business_via_name in feature_toggles.get(feature_name, {}).get('business_via_names', []) @staticmethod @@ -228,8 +220,6 @@ def is_enabled_for_expert(feature_name: str, (bool): True if Feature is enabled else False """ feature_toggles = FeatureToggles.fetch_feature_toggles() - LOGGER.info(f"Enable_for_expert_FT_cache_info: " - f"{FeatureToggles.fetch_feature_toggles.__wrapped__.cache_info()}") return expert_email in feature_toggles.get(feature_name, {}).get('expert_emails', []) @staticmethod @@ -244,8 +234,6 @@ def is_enabled_for_team(feature_name: str, (bool): True if feature is enabled else False """ feature_toggles = FeatureToggles.fetch_feature_toggles() - LOGGER.info(f"Enable_for_team_FT_cache_info: " - f"{FeatureToggles.fetch_feature_toggles.__wrapped__.cache_info()}") return team_id in feature_toggles.get(feature_name, {}).get('team_ids', []) @staticmethod @@ -264,9 +252,6 @@ def fetch_feature_toggles(): """ # TODO: Remove the cas and environment name from the feature toggles while returning the response response = {} - LOGGER.info(f'Loading Feature Toggles from Redis') - LOGGER.info(f"Fetch_feature_toggles_cache_info:" - f"{FeatureToggles.fetch_feature_toggles.__wrapped__.cache_info()}") if FeatureToggles.__cache is None: LOGGER.error('To update cache Feature Toggles class needs to be initialised') return response