Replace console.error with logger.error
Related https://github.com/vector-im/element-web/issues/18425
This commit is contained in:
parent
9c594a8a96
commit
5e73a212f4
124 changed files with 417 additions and 250 deletions
|
@ -25,6 +25,8 @@ import { replaceableComponent } from "../../../utils/replaceableComponent";
|
|||
import BugReportDialog from '../dialogs/BugReportDialog';
|
||||
import AccessibleButton from './AccessibleButton';
|
||||
|
||||
import { logger } from "matrix-js-sdk/src/logger";
|
||||
|
||||
interface IState {
|
||||
error: Error;
|
||||
}
|
||||
|
@ -52,8 +54,8 @@ export default class ErrorBoundary extends React.PureComponent<{}, IState> {
|
|||
componentDidCatch(error: Error, { componentStack }: ErrorInfo): void {
|
||||
// Browser consoles are better at formatting output when native errors are passed
|
||||
// in their own `console.error` invocation.
|
||||
console.error(error);
|
||||
console.error(
|
||||
logger.error(error);
|
||||
logger.error(
|
||||
"The above error occured while React was rendering the following components:",
|
||||
componentStack,
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue