mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Add duration in logging
This commit is contained in:
parent
b0bf4fc5ce
commit
c482ad320b
1 changed files with 5 additions and 1 deletions
|
|
@ -82,6 +82,7 @@ export function articleRouter() {
|
|||
}
|
||||
const { uid } = jwt.decode(token) as Claims
|
||||
|
||||
const startTime = Date.now()
|
||||
logger.info('Get article speech in mp3 format', {
|
||||
params: req.params,
|
||||
labels: {
|
||||
|
|
@ -125,7 +126,10 @@ export function articleRouter() {
|
|||
user: { id: uid },
|
||||
})
|
||||
|
||||
logger.info('Found speech mp3', { audioUrl: speech.audioUrl })
|
||||
logger.info('Found speech mp3', {
|
||||
audioUrl: speech.audioUrl,
|
||||
duration: Date.now() - startTime,
|
||||
})
|
||||
res.redirect(speech.audioUrl)
|
||||
}
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue