diff --git a/ghost/members-api/index.js b/ghost/members-api/index.js index 4993c0a3d3..233a8255d0 100644 --- a/ghost/members-api/index.js +++ b/ghost/members-api/index.js @@ -151,7 +151,8 @@ module.exports = function MembersApi({ checkoutCancelUrl: stripeConfig.checkoutCancelUrl, billingSuccessUrl: stripeConfig.billingSuccessUrl, billingCancelUrl: stripeConfig.billingCancelUrl - } + }, + logging: common.logging }); const ready = paymentConfig.stripe ? Promise.all([ diff --git a/ghost/members-api/lib/controllers/router/index.js b/ghost/members-api/lib/controllers/router/index.js index 76443183c0..aa211d1b94 100644 --- a/ghost/members-api/lib/controllers/router/index.js +++ b/ghost/members-api/lib/controllers/router/index.js @@ -13,6 +13,7 @@ const errors = require('@tryghost/ignition-errors'); * @param {any} deps.stripeAPIService * @param {any} deps.tokenService * @param {any} deps.config + * @param {any} deps.logging */ module.exports = class RouterController { constructor({ @@ -23,7 +24,8 @@ module.exports = class RouterController { stripeAPIService, tokenService, sendEmailWithMagicLink, - config + config, + logging }) { this._memberRepository = memberRepository; this._StripePrice = StripePrice; @@ -33,6 +35,7 @@ module.exports = class RouterController { this._tokenService = tokenService; this._sendEmailWithMagicLink = sendEmailWithMagicLink; this._config = config; + this._logging = logging; } async ensureStripe(_req, res, next) { @@ -182,7 +185,7 @@ module.exports = class RouterController { break; } } catch (err) { - console.log('Ignoring error for fetching customer for checkout'); + this._logging.info('Ignoring error for fetching customer for checkout'); } } diff --git a/ghost/members-api/lib/repositories/member/index.js b/ghost/members-api/lib/repositories/member/index.js index 517b29ac4d..247846f1c4 100644 --- a/ghost/members-api/lib/repositories/member/index.js +++ b/ghost/members-api/lib/repositories/member/index.js @@ -633,7 +633,7 @@ module.exports = class MemberRepository { const fetchedCustomer = await this._stripeAPIService.getCustomer(customer.get('customer_id')); stripeCustomer = fetchedCustomer; } catch (err) { - console.log('Ignoring error for fetching customer for checkout'); + this._logging.info('Ignoring error for fetching customer for checkout'); } }