From d50477b0616c4fb79e01c711fb0a90d733ca33ca Mon Sep 17 00:00:00 2001 From: "d.zakharchuk" Date: Mon, 19 Feb 2024 16:51:09 +0200 Subject: [PATCH] fix log level for conditions --- featureflags_client/http/conditions.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/featureflags_client/http/conditions.py b/featureflags_client/http/conditions.py index 2f17bf4..eda8415 100644 --- a/featureflags_client/http/conditions.py +++ b/featureflags_client/http/conditions.py @@ -144,7 +144,7 @@ def proc(ctx: Dict[str, Any], _value: Optional[Set] = None) -> bool: def check_proc(check: Check) -> Callable: if check.value is None: - log.info(f"Check[{check}].value is None") + log.debug(f"Check[{check}].value is None") return false return OPERATIONS_MAP[check.operator](check.variable.name, check.value) @@ -153,7 +153,9 @@ def check_proc(check: Check) -> Callable: def flag_proc(flag: Flag) -> Optional[Callable]: if not flag.overridden: # Flag was not overridden on server, use value from defaults. - log.info(f"Flag[{flag.name}] is not overriden yet, using default value") + log.debug( + f"Flag[{flag.name}] is not overriden yet, using default value" + ) return None conditions = [] @@ -163,7 +165,7 @@ def flag_proc(flag: Flag) -> Optional[Callable]: # in case of invalid condition it would be safe to replace it # with a falsish condition if not checks_procs: - log.info("Condition has empty checks") + log.debug("Condition has empty checks") checks_procs = [false] conditions.append(checks_procs) @@ -176,7 +178,9 @@ def proc(ctx: Dict[str, Any]) -> bool: ) else: - log.info(f"Flag[{flag.name}] is disabled or do not have any conditions") + log.debug( + f"Flag[{flag.name}] is disabled or do not have any conditions" + ) def proc(ctx: Dict[str, Any]) -> bool: return flag.enabled