mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-12-24 20:33:09 +02:00
Better logs
This commit is contained in:
parent
76a0d0fee9
commit
60c30ece10
1 changed files with 12 additions and 3 deletions
|
@ -47,7 +47,10 @@ export default async (
|
||||||
});
|
});
|
||||||
|
|
||||||
writable.on('error', error => {
|
writable.on('error', error => {
|
||||||
logger.error(error);
|
logger.error(`Download failed: ${chalk.cyan(url)}: ${error}`, {
|
||||||
|
url: url,
|
||||||
|
e: error
|
||||||
|
});
|
||||||
rej(error);
|
rej(error);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -73,7 +76,10 @@ export default async (
|
||||||
});
|
});
|
||||||
|
|
||||||
req.on('error', error => {
|
req.on('error', error => {
|
||||||
logger.error(error);
|
logger.error(`Failed to start download: ${chalk.cyan(url)}: ${error}`, {
|
||||||
|
url: url,
|
||||||
|
e: error
|
||||||
|
});
|
||||||
writable.close();
|
writable.close();
|
||||||
rej(error);
|
rej(error);
|
||||||
});
|
});
|
||||||
|
@ -87,7 +93,10 @@ export default async (
|
||||||
logger.succ(`Got: ${driveFile._id}`);
|
logger.succ(`Got: ${driveFile._id}`);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
error = e;
|
error = e;
|
||||||
logger.error(`Failed: ${e}`);
|
logger.error(`Failed to create drive file: ${e}`, {
|
||||||
|
url: url,
|
||||||
|
e: e
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// clean-up
|
// clean-up
|
||||||
|
|
Loading…
Reference in a new issue