Improve Logging (#1519)

Improve Logging

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
Tilman Vatteroth 2021-09-28 22:06:35 +02:00 committed by GitHub
parent 1172a1d7b8
commit 0e512531a0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
41 changed files with 361 additions and 92 deletions

View file

@ -10,6 +10,9 @@ import links from '../../links.json'
import frontendVersion from '../../version.json'
import { ForkAwesomeIcon } from '../common/fork-awesome/fork-awesome-icon'
import { ExternalLink } from '../common/links/external-link'
import { Logger } from '../../utils/logger'
const log = new Logger('ErrorBoundary')
export class ErrorBoundary extends Component {
state: {
@ -27,8 +30,7 @@ export class ErrorBoundary extends Component {
}
componentDidCatch(error: Error, errorInfo: ErrorInfo): void {
console.error('error caught', error)
console.error('additional information', errorInfo)
log.error('Error catched', error, errorInfo)
}
refreshPage(): void {