From 6f0cd45ca1b65e3e99aeab6c945795d203576ba4 Mon Sep 17 00:00:00 2001 From: Nikita Melkozerov Date: Mon, 4 Mar 2024 17:38:22 +0000 Subject: [PATCH] more logging --- fixbackend/subscription/aws_marketplace.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/fixbackend/subscription/aws_marketplace.py b/fixbackend/subscription/aws_marketplace.py index 40c6f9f7..6b9bf52d 100644 --- a/fixbackend/subscription/aws_marketplace.py +++ b/fixbackend/subscription/aws_marketplace.py @@ -116,7 +116,7 @@ async def subscribed(self, user: User, token: str) -> Tuple[SubscriptionMethod, log.info(f"AWS Marketplace subscription for user {user.email} with token {token}") # Get the related data from AWS. Will throw in case of an error. customer_data = self.marketplace_client.resolve_customer(RegistrationToken=token) - log.debug(f"AWS Marketplace user {user.email} got customer data: {customer_data}") + log.info(f"AWS Marketplace user {user.email} got customer data: {customer_data}") product_code = customer_data["ProductCode"] customer_identifier = customer_data["CustomerIdentifier"] customer_aws_account_id = customer_data["CustomerAWSAccountId"] @@ -136,7 +136,9 @@ async def subscribed(self, user: User, token: str) -> Tuple[SubscriptionMethod, # only create a new subscription if there is no existing one if existing := await self.subscription_repo.aws_marketplace_subscription(user.id, customer_identifier): - log.debug(f"AWS Marketplace user {user.email}: return existing subscription") + log.info( + f"AWS Marketplace user {user.email}: return existing subscription, user_id: {existing}, customer_identifier: {customer_identifier}" + ) return existing, workspace_assigned else: subscription = AwsMarketplaceSubscription(