Skip to content

Commit a0c2ac4

Browse files
authored
fix(logging): adserver is very noisy for feedback requests, possibly affecting performance (#5351)
1 parent f6e08c2 commit a0c2ac4

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

components/alibi-detect-server/adserver/cm_model.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,7 @@ def process_event(self, inputs: Union[List, Dict], headers: Dict) -> Optional[Mo
9797
9898
"""
9999
logging.info("PROCESSING Feedback Event.")
100-
logging.info(str(headers))
101-
logging.info("----")
100+
logging.debug(str(headers))
102101

103102
metrics: List[Dict] = []
104103
output: Dict = {}
@@ -161,7 +160,7 @@ def process_event(self, inputs: Union[List, Dict], headers: Dict) -> Optional[Mo
161160
error, status_code=400, reason="METRICS_SERVER_ERROR"
162161
)
163162

164-
logging.error(f"{truth}, {response}")
163+
logging.info(f"truth: {truth}, response: {response}")
165164
metrics_transformed = self.model.transform(truth, response)
166165

167166
metrics.extend(metrics_transformed.metrics)

components/alibi-detect-server/adserver/server.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -260,10 +260,10 @@ def post(self):
260260

261261
if not self.reply_url == "":
262262
logging.debug(json.dumps(revent.Properties()))
263-
logging.info("binary CloudEvent")
263+
logging.debug("binary CloudEvent")
264264
for k, v in revent_headers.items():
265-
logging.info("{0}: {1}\r\n".format(k, v))
266-
logging.info(revent_data)
265+
logging.debug("{0}: {1}\r\n".format(k, v))
266+
logging.debug(revent_data)
267267
forward_request(revent_headers, revent_data, self.reply_url)
268268

269269
self.set_header("Content-Type", "application/json")

0 commit comments

Comments
 (0)