Use window.log in browser context, turn on console eslint rule
This commit is contained in:
@@ -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
|
||||
);
|
||||
|
Reference in New Issue
Block a user