Skip to content

Commit 2d27005

Browse files
committed
✏️ Do not log stats input/output
Signed-off-by: Muhammed Hussein Karimi <info@karimi.dev>
1 parent 7284b4a commit 2d27005

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

haproxy_redis_sentinel/handler.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,10 @@ def get_master_address(self) -> str:
5555

5656
return address
5757

58-
def send_command(self, commands: str | list[str]) -> str:
58+
def send_command(self, commands: str | list[str], log_data=True) -> str:
5959
out = send_command(self.haproxy_socket, commands)
60-
info(f"HAProxy command: {commands}, Output: {out}")
60+
if log_data:
61+
info(f"HAProxy command: {commands}, Output: {out}")
6162
return out
6263

6364
def shutdown_current_server(self) -> str:
@@ -128,7 +129,8 @@ def set_initial_server(self):
128129
def haproxy_server_checker(self):
129130
stats: list[list[dict | None] | None] | None = orjson.loads(
130131
self.send_command(
131-
f"show stat {self.haproxy_backend} 4 -1 json"
132+
f"show stat {self.haproxy_backend} 4 -1 json",
133+
log_data=False,
132134
)
133135
)
134136
if stats is None:

0 commit comments

Comments
 (0)