Better logs
This commit is contained in:
parent
9835945ee1
commit
71ba72e796
@ -43,11 +43,11 @@ export default (user: ILocalUser, url: string, object: any) => new Promise(async
|
|||||||
'Digest': `SHA-256=${hash}`
|
'Digest': `SHA-256=${hash}`
|
||||||
}
|
}
|
||||||
}, res => {
|
}, res => {
|
||||||
logger.info(`${url} --> ${res.statusCode}`);
|
|
||||||
|
|
||||||
if (res.statusCode >= 400) {
|
if (res.statusCode >= 400) {
|
||||||
|
logger.warn(`${url} --> ${res.statusCode}`);
|
||||||
reject(res);
|
reject(res);
|
||||||
} else {
|
} else {
|
||||||
|
logger.succ(`${url} --> ${res.statusCode}`);
|
||||||
resolve();
|
resolve();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user