mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-06-07 18:04:56 -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
|
@ -11,6 +11,9 @@ import { createSetUpTaskList, InitTask } from './initializers'
|
|||
import { LoadingScreen } from './loading-screen'
|
||||
import { useCustomizeAssetsUrl } from '../../hooks/common/use-customize-assets-url'
|
||||
import { useFrontendAssetsUrl } from '../../hooks/common/use-frontend-assets-url'
|
||||
import { Logger } from '../../utils/logger'
|
||||
|
||||
const log = new Logger('ApplicationLoader')
|
||||
|
||||
export const ApplicationLoader: React.FC = ({ children }) => {
|
||||
const frontendAssetsUrl = useFrontendAssetsUrl()
|
||||
|
@ -36,7 +39,7 @@ export const ApplicationLoader: React.FC = ({ children }) => {
|
|||
useEffect(() => {
|
||||
for (const task of initTasks) {
|
||||
runTask(task.task).catch((reason: Error) => {
|
||||
console.error(reason)
|
||||
log.error('Error while initialising application', reason)
|
||||
setFailedTitle(task.name)
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue