mirror of
https://github.com/Sebclem/hassio-nextcloud-backup.git
synced 2024-12-23 22:46:44 +01:00
✏️ Add more debug logs for #8
This commit is contained in:
parent
77259a17e6
commit
80aa6fc2a4
@ -3,7 +3,7 @@ const winston = require('winston');
|
||||
|
||||
|
||||
const logger = winston.createLogger({
|
||||
level: 'info',
|
||||
level: 'debug',
|
||||
format: winston.format.combine(
|
||||
winston.format.timestamp({
|
||||
format: 'YYYY-MM-DD HH:mm:ss'
|
||||
|
@ -85,6 +85,7 @@ function downloadSnapshot(id) {
|
||||
logger.info('Download success !')
|
||||
status.progress = 1;
|
||||
statusTools.setStatus(status);
|
||||
logger.debug("Snapshot dl size : " + (fs.statSync('./temp/' + id + '.tar').size / 1024 / 1024))
|
||||
resolve();
|
||||
})
|
||||
.pipe(stream);
|
||||
@ -139,8 +140,11 @@ function checkSnap(id) {
|
||||
request(option, (error, response, body) => {
|
||||
if (error || response.statusCode != 200)
|
||||
reject();
|
||||
else
|
||||
else{
|
||||
logger.debug("Snapshot size: " + body.data.size)
|
||||
resolve();
|
||||
}
|
||||
|
||||
})
|
||||
});
|
||||
|
||||
|
@ -195,7 +195,7 @@ class WebdavTools {
|
||||
reject(status.message);
|
||||
}
|
||||
else {
|
||||
logger.info("...Upload finish !");
|
||||
logger.info("...Upload finish ! (status: " + res.statusCode + ")");
|
||||
status.status = "idle";
|
||||
status.progress = -1;
|
||||
status.message = null;
|
||||
@ -213,8 +213,6 @@ class WebdavTools {
|
||||
hassioApiTools.clean();
|
||||
}
|
||||
resolve();
|
||||
|
||||
|
||||
}
|
||||
})
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user