GT2/Ejectable/node_modules/expo/tools/LogReporter.js

17 lines
349 B
JavaScript

const serializeError = require('serialize-error');
/**
* @deprecated: Remove in SDK 38
* https://github.com/expo/expo-cli/pull/1269
*/
class LogReporter {
update(event) {
if (event.error instanceof Error) {
event.error = serializeError(event.error);
}
console.log(JSON.stringify(event));
}
}
module.exports = LogReporter;