mirror of
https://github.com/pyMC-dev/pyMC_Repeater.git
synced 2026-08-12 03:43:04 +02:00
refactor: enhance logging and error handling in API endpoints and HTTP server
This commit is contained in:
@@ -94,7 +94,10 @@ class LogBuffer(logging.Handler):
|
||||
}
|
||||
|
||||
if record.exc_info:
|
||||
entry["exception"] = self.formatException(record.exc_info)
|
||||
formatter = self.formatter or logging.Formatter()
|
||||
entry["exception"] = self._sanitize_log_text(
|
||||
formatter.formatException(record.exc_info)
|
||||
)
|
||||
|
||||
with self._lock:
|
||||
self.logs.append(entry)
|
||||
|
||||
Reference in New Issue
Block a user