Update test.js

- fixes issue with error logging
- update console message
This commit is contained in:
freearhey 2021-03-01 03:13:56 +03:00
parent 4f634b4768
commit b2eda1f755
1 changed files with 3 additions and 3 deletions

View File

@ -51,8 +51,7 @@ async function test() {
.catch(error => {
if (error.response) {
stats.failures++
utils.writeToLog(country.url, error.message, channel.url)
console.log(`Error: ${error.message} '${channel.url}'`)
utils.writeToLog(item.url, error.message, channel.url)
}
})
}
@ -62,7 +61,8 @@ async function test() {
console.log(`\nOK (${stats.playlists} playlists, ${stats.channels} channels)`)
} else {
console.log(
`\nFAILURES! (${stats.playlists} playlists, ${stats.channels} channels, ${stats.failures} failures)`
`\nFAILURES! (${stats.playlists} playlists, ${stats.channels} channels, ${stats.failures} failures)
\n\nCheck the "error.log" file to see which links failed.`
)
process.exit(1)