setLogger added to the RedundantHttpListProvider (#501)

This commit is contained in:
Alexander Kolotov 2020-12-21 22:16:37 +03:00 committed by GitHub
parent 4d468ae107
commit 811b1a27f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -15,6 +15,10 @@ function RedundantHttpListProvider(urls, options = {}) {
this.options = { ...defaultOptions, ...options } this.options = { ...defaultOptions, ...options }
} }
RedundantHttpListProvider.prototype.setLogger = function(logger) {
this.logger = logger.child({ module: `RedundantHttpListProvider:${this.options.name}` })
}
RedundantHttpListProvider.prototype.send = async function send(payload, callback) { RedundantHttpListProvider.prototype.send = async function send(payload, callback) {
try { try {
const result = await promiseRetry(retry => { const result = await promiseRetry(retry => {