mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Improve debug logging related for client-side errors and sandbox crashes.
Summary: - Include docId when available for client-side error reporting - Distinguish sandbox crashes from forced exits Test Plan: Tested manually Reviewers: paulfitz Reviewed By: paulfitz Differential Revision: https://phab.getgrist.com/D3373
This commit is contained in:
@@ -576,6 +576,7 @@ export class FlexServer implements GristServer {
|
||||
const mreq = req as RequestWithLogin;
|
||||
log.rawWarn('client error', {
|
||||
event: req.body.event,
|
||||
docId: req.body.docId,
|
||||
page: req.body.page,
|
||||
browser: req.body.browser,
|
||||
org: mreq.org,
|
||||
|
||||
@@ -233,8 +233,13 @@ export class NSandbox implements ISandbox {
|
||||
}
|
||||
|
||||
private _onExit(code: number, signal: string) {
|
||||
const expected = this._isWriteClosed;
|
||||
this._close();
|
||||
log.rawDebug(`Sandbox exited with code ${code} signal ${signal}`, this._logMeta);
|
||||
if (expected) {
|
||||
log.rawDebug(`Sandbox exited with code ${code} signal ${signal}`, this._logMeta);
|
||||
} else {
|
||||
log.rawWarn(`Sandbox unexpectedly exited with code ${code} signal ${signal}`, this._logMeta);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user