mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-29 06:15:29 -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
|
@ -8,7 +8,9 @@ import { Settings } from 'luxon'
|
|||
import React, { useCallback, useMemo } from 'react'
|
||||
import { Form } from 'react-bootstrap'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import { Logger } from '../../../utils/logger'
|
||||
|
||||
const log = new Logger('LanguagePicker')
|
||||
const languages = {
|
||||
en: 'English',
|
||||
'zh-CN': '简体中文',
|
||||
|
@ -61,7 +63,7 @@ export const LanguagePicker: React.FC = () => {
|
|||
(event: React.ChangeEvent<HTMLSelectElement>) => {
|
||||
const language = event.currentTarget.value
|
||||
Settings.defaultLocale = language
|
||||
i18n.changeLanguage(language).catch((error) => console.error('Error while switching language', error))
|
||||
i18n.changeLanguage(language).catch((error) => log.error('Error while switching language', error))
|
||||
},
|
||||
[i18n]
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue