Skip to content

Commit

Permalink
Fix logging format
Browse files Browse the repository at this point in the history
  • Loading branch information
jorwoods committed Oct 16, 2023
1 parent 3c4373e commit 02ac7fb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tableauserverclient/server/endpoint/tasks_endpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def get(
if task_type == TaskItem.Type.DataAcceleration:
self.parent_srv.assert_at_least_version("3.8", "Data Acceleration Tasks")

logger.info("Querying all {} tasks for the site".format(task_type))
logger.info("Querying all %s tasks for the site", task_type)

url = "{0}/{1}".format(self.baseurl, self.__normalize_task_type(task_type))
server_response = self.get_request(url, req_options)
Expand All @@ -48,7 +48,7 @@ def get_by_id(self, task_id: str) -> TaskItem:
if not task_id:
error = "No Task ID provided"
raise ValueError(error)
logger.info("Querying a single task by id ({})".format(task_id))
logger.info("Querying a single task by id %s", task_id)
url = "{}/{}/{}".format(
self.baseurl,
self.__normalize_task_type(TaskItem.Type.ExtractRefresh),
Expand All @@ -62,7 +62,7 @@ def create(self, extract_item: TaskItem) -> TaskItem:
if not extract_item:
error = "No extract refresh provided"
raise ValueError(error)
logger.info("Creating an extract refresh ({})".format(extract_item))
logger.info("Creating an extract refresh %s", extract_item)
url = "{0}/{1}".format(self.baseurl, self.__normalize_task_type(TaskItem.Type.ExtractRefresh))
create_req = RequestFactory.Task.create_extract_req(extract_item)
server_response = self.post_request(url, create_req)
Expand Down Expand Up @@ -94,4 +94,4 @@ def delete(self, task_id: str, task_type: str = TaskItem.Type.ExtractRefresh) ->
raise ValueError(error)
url = "{0}/{1}/{2}".format(self.baseurl, self.__normalize_task_type(task_type), task_id)
self.delete_request(url)
logger.info("Deleted single task (ID: {0})".format(task_id))
logger.info("Deleted single task (ID: %s)", task_id)

0 comments on commit 02ac7fb

Please sign in to comment.