mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-19 01:35:18 -04:00
Improve Logging (#1519)
Improve Logging Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
parent
1172a1d7b8
commit
0e512531a0
41 changed files with 361 additions and 92 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue