eschutho commented on code in PR #25118: URL: https://github.com/apache/superset/pull/25118#discussion_r1312202644
########## superset/stats_logger.py: ########## @@ -51,24 +63,30 @@ def gauge(self, key: str, value: float) -> None: class DummyStatsLogger(BaseStatsLogger): def incr(self, key: str) -> None: - logger.debug(Fore.CYAN + "[stats_logger] (incr) " + key + Style.RESET_ALL) + if self.should_log(key): + logger.debug(Fore.CYAN + "[stats_logger] (incr) " + key + Style.RESET_ALL) def decr(self, key: str) -> None: - logger.debug(Fore.CYAN + "[stats_logger] (decr) " + key + Style.RESET_ALL) + if self.should_log(key): + logger.debug(Fore.CYAN + "[stats_logger] (decr) " + key + Style.RESET_ALL) def timing(self, key: str, value: float) -> None: - logger.debug( - Fore.CYAN + f"[stats_logger] (timing) {key} | {value} " + Style.RESET_ALL - ) + if self.should_log(key): + logger.debug( + Fore.CYAN + + f"[stats_logger] (timing) {key} | {value} " + + Style.RESET_ALL + ) def gauge(self, key: str, value: float) -> None: - logger.debug( - Fore.CYAN - + "[stats_logger] (gauge) " - + f"{key}" - + f"{value}" - + Style.RESET_ALL - ) + if self.should_log(key): Review Comment: Yeah, that sounds like a good idea. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For additional commands, e-mail: notifications-h...@superset.apache.org