fix log.add under electron (#478)

Expose the log.add method, used in old Electron code. Without this change, using the Electron build of Grist fails if is configured for debug log output.
This commit is contained in:
Paul Fitzpatrick
2023-04-03 13:29:35 -04:00
committed by GitHub
parent f5eb8f7730
commit b2b41a0bf8

View File

@@ -53,6 +53,8 @@ const log: LogWithTimestamp = Object.assign(rawLog, {
rawWarn: (msg: string, meta: ILogMeta) => origLog.call(log, 'warn', msg, meta),
rawDebug: (msg: string, meta: ILogMeta) => origLog.call(log, 'debug', msg, meta),
origLog,
add: rawLog.add.bind(rawLog), // Explicitly pass add method along - otherwise
// there's an odd glitch under Electron.
});
/**