Skip to content

Commit

Permalink
updated logger statements
Browse files Browse the repository at this point in the history
  • Loading branch information
prdpsvs committed Jan 4, 2025
1 parent eafb0c1 commit 550798a
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions dbt/adapters/fabricspark/livysession.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ def get_default_access_token(credentials: SparkCredentials) -> AccessToken:
# Create an AccessToken instance
accessToken = AccessToken(token=credentials.accessToken, expires_on=expires_on)
logger.info("SPN - Default- Fetched Access Token")
logger.info(f"access token is {credentials.accessToken}")
return accessToken


Expand All @@ -128,11 +127,7 @@ def get_headers(credentials: SparkCredentials, tokenPrint: bool = False) -> dict

headers = {"Content-Type": "application/json", "Authorization": f"Bearer {accessToken.token}"}
if tokenPrint:
logger.info(f"header is {headers}")
debug_token = f"DEBUG-{accessToken.token}"

# Print the unmasked token
print(f"Unmasked token: {debug_token}")
print(f"token is : {accessToken.token}")

return headers

Expand Down Expand Up @@ -161,7 +156,7 @@ def create_session(self, data) -> str:
response = None
print("Creating Livy session (this may take a few minutes)")
try:
print("Session URL is ", self.connect_url)
print(f"data is {data}")
response = requests.post(
self.connect_url + "/sessions",
data=json.dumps(data),
Expand Down

0 comments on commit 550798a

Please sign in to comment.