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

Fix broken local serve due to azure logging middleware failure #31

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jjgriff93
Copy link
Member

Fixes #28

When docker compose is used (for serve-local), it sets any unset variables as empty strings in the container environment. So, as would be typical for local scenarios not using application insights, when unset, the logging initialisation fails as it only catches for the env var being None, when it also needs to catch for empty strings.

Have amended with a check before the logging is initialised, which will skip if the APPLICATIONINSIGHTS_CONNECTION_STRING is None or "", logging a warning message to the console if so

@jjgriff93 jjgriff93 requested a review from hqva May 23, 2023 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Azure Logging/Monitoring breaks local development
1 participant