Skip to content

Commit

Permalink
refactor: Use logger, not the root logger (logging) (#547)
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielArndt authored Dec 2, 2024
1 parent 4bf7298 commit a57a5d2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/charms/vault_k8s/v0/vault_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

# Increment this PATCH version before using `charmcraft publish-lib` or reset
# to 0 if you are raising the major API version
LIBPATCH = 22
LIBPATCH = 23


RAFT_STATE_ENDPOINT = "v1/sys/storage/raft/autopilot/state"
Expand Down Expand Up @@ -166,7 +166,7 @@ def is_sealed(self) -> bool:
#
# hvac.exceptions.InternalServerError:
# core: barrier reports initialized but no seal configuration found
logging.error("Error while checking Vault seal status: %s", e)
logger.error("Error while checking Vault seal status: %s", e)
raise VaultClientError(e) from e

def read(self, path: str) -> dict:
Expand Down Expand Up @@ -573,7 +573,7 @@ def make_latest_pki_issuer_default(self, mount: str) -> None:
def create_transit_key(self, mount_point: str, key_name: str) -> None:
"""Create a new key in the transit backend."""
response = self._client.secrets.transit.create_key(mount_point=mount_point, name=key_name)
logging.debug("Created a new transit key. response=%s", response)
logger.debug("Created a new transit key. response=%s", response)

def delete_role(self, name: str) -> None:
"""Delete the approle with the given name."""
Expand Down

0 comments on commit a57a5d2

Please sign in to comment.