Skip to content

Commit

Permalink
added err_handler_logs storage for server side operation
Browse files Browse the repository at this point in the history
  • Loading branch information
flukexp committed Jan 18, 2025
1 parent 28b5976 commit be194ea
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions public/debugLogger.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,17 @@ if (typeof window !== "undefined") {
ts: +new Date,
arguments,
});

const logsUrl = new URL(`${window.location.protocol}//${window.location.hostname}:${window.location.port}/api/dataHandler`);
logsUrl.searchParams.append("type", "logs");
if (window.location.hostname === "localhost") {
fetch(logsUrl, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify(logEntry),
});
}

passf.apply(null, arguments);
}

Expand Down

0 comments on commit be194ea

Please sign in to comment.