Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added logging #46

Merged
merged 3 commits into from
Oct 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,10 @@ def _db_connection_string(self) -> str:
logger.info(f"Generated database connection string with endpoints: {endpoints}.")
return connection_string
else:
logger.warning("Missing database relation data. Cannot generate connection string.")
logger.warning(
f"Missing database relation data. Cannot generate connection string. Got username: {username is not None}, Got password: {password is not None}, Got endpoints: {endpoints is not None}"
)
logger.debug(f"Keys available in relation: {list(data.keys())}")
return ""


Expand Down
2 changes: 1 addition & 1 deletion tests/integration/env-vars.env
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ APP_PORT=81
APP_JWT_SECRET=deadbeef
APP_ADMIN_USER=shadow
APP_ADMIN_PASSWORD=maria

APP_SNAPCRAFT_IO_URI=http://snapcraft-mock:11111/
Loading