mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-15 07:34:42 -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
|
@ -5,6 +5,9 @@
|
|||
*/
|
||||
|
||||
import React, { MutableRefObject, useCallback, useEffect, useRef } from 'react'
|
||||
import { Logger } from '../../../utils/logger'
|
||||
|
||||
const log = new Logger('UploadInput')
|
||||
|
||||
export interface UploadInputProps {
|
||||
onLoad: (file: File) => Promise<void>
|
||||
|
@ -30,7 +33,7 @@ export const UploadInput: React.FC<UploadInputProps> = ({ onLoad, acceptedFiles,
|
|||
fileInput.value = ''
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error(error)
|
||||
log.error('Error while uploading file', error)
|
||||
})
|
||||
})
|
||||
fileInput.click()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue