client: extend logging
In able to make it easier to debug issues.
This commit is contained in:
parent
4bc29f6d3f
commit
3c9d1ff5e3
|
@ -90,12 +90,13 @@ export class RestExtractor {
|
|||
}
|
||||
|
||||
if (err.status !== undefined) {
|
||||
// A fetch response
|
||||
const errorMessage = this.buildServerErrorMessage(err)
|
||||
|
||||
const message = `Backend returned code ${err.status}, errorMessage is: ${errorMessage}`
|
||||
|
||||
if (err.status === HttpStatusCode.NOT_FOUND_404) logger.clientError(message)
|
||||
else logger.error(message)
|
||||
else logger.error(message, { type: err.type, url: err.url })
|
||||
|
||||
return errorMessage
|
||||
}
|
||||
|
|
|
@ -306,7 +306,12 @@ export class PeerTubePlayer {
|
|||
return
|
||||
}
|
||||
|
||||
logger.info('Fast forwarding HLS to recover from an error.')
|
||||
logger.info('Fast forwarding HLS to recover from an error.', {
|
||||
err,
|
||||
videoShortUUID: this.currentLoadOptions.videoShortUUID,
|
||||
currentTime: this.player.currentTime(),
|
||||
resolution: this.player.videoHeight()
|
||||
})
|
||||
|
||||
this.videojsDecodeErrors++
|
||||
|
||||
|
|
Loading…
Reference in New Issue