export function overrideConsole() {
const _warn = console.warn;
console.warn = function (...args) {
// do something else
_warn.call(
console,
'[override] warn: ' + [].slice.call(args).join(' '),
);
};
const _error = console.error;
console.error = function (...args) {
// do something else
_error.call(
console,
'[override] error: ' + [].slice.call(args).join(' '),
);
};
}