Skip to content

Commit

Permalink
cdislogging
Browse files Browse the repository at this point in the history
  • Loading branch information
mattreex committed Jun 9, 2021
1 parent b1bf1d6 commit 198fdb2
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions cirrus/google_cloud/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,16 @@
import hashlib
import re
from urllib.parse import quote, urlencode
import logging

from oauth2client.service_account import ServiceAccountCredentials
from google.oauth2 import service_account

from cdislogging import get_logger

from cirrus.config import config
from cirrus.google_cloud.errors import GoogleNamingError

GOOGLE_SERVICE_ACCOUNT_REGEX = "[a-z][a-z\d\-]*[a-z\d]"
logging.basicConfig(level=logging.INFO)
logger = get_logger(__name__, log_level="info")


def get_valid_service_account_id_for_user(user_id, username, prefix=""):
Expand Down Expand Up @@ -275,7 +274,7 @@ def get_signed_url(
creds = service_account.Credentials.from_service_account_info(service_account_creds)

bucket_name = path_to_resource.split("/")[0]
logging.info("Generating URL for bucket name: {}".format(bucket_name))
logger.info("Generating URL for bucket name: {}".format(bucket_name))
object_name = "/".join(path_to_resource.split("/")[1:])
escaped_object_name = quote(object_name.encode(), safe=b"/~")
canonical_uri = "/{}".format(escaped_object_name)
Expand Down

0 comments on commit 198fdb2

Please sign in to comment.