Skip to content

Commit bf5c565

Browse files
committed
logging
1 parent a377ce7 commit bf5c565

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/databricks/sql/auth/oauth.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,7 @@ def get_token(self) -> Token:
335335
return self.token
336336

337337
def refresh(self) -> Token:
338+
logger.info("Refreshing OAuth token using client credentials flow")
338339
headers = {
339340
HttpHeader.CONTENT_TYPE.value: "application/x-www-form-urlencoded",
340341
}

src/databricks/sql/common/http.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,13 @@ def get_instance(cls) -> "DatabricksHttpClient":
6767
def execute(
6868
self, method: HttpMethod, url: str, **kwargs
6969
) -> Generator[requests.Response, None, None]:
70+
logger.info("Executing HTTP request: %s with url: %s", method.value, url)
7071
response = None
7172
try:
7273
response = self.session.request(method.value, url, **kwargs)
7374
yield response
7475
except Exception as e:
75-
logger.error(f"Error executing HTTP request in DatabricksHttpClient: {e}")
76+
logger.error("Error executing HTTP request in DatabricksHttpClient: %s", e)
7677
raise e
7778
finally:
7879
if response is not None:

0 commit comments

Comments
 (0)