Use window.log in browser context, turn on console eslint rule

This commit is contained in:
Scott Nonnenberg
2018-07-21 12:00:08 -07:00
parent 4320b125dd
commit 5933a34a18
71 changed files with 816 additions and 559 deletions

View File

@@ -29,15 +29,17 @@
this.remove();
},
async onDeleteAllData() {
console.log('Deleting everything!');
window.log.info('Deleting everything!');
this.step = CLEAR_DATA_STEPS.DELETING;
this.render();
try {
await Database.close();
console.log('All database connections closed. Starting delete.');
window.log.info('All database connections closed. Starting delete.');
} catch (error) {
console.log('Something went wrong closing all database connections.');
window.log.error(
'Something went wrong closing all database connections.'
);
}
this.clearAllData();
@@ -46,7 +48,7 @@
try {
await Promise.all([Logs.deleteAll(), Database.drop()]);
} catch (error) {
console.log(
window.log.error(
'Something went wrong deleting all data:',
error && error.stack ? error.stack : error
);