Skip to content

add SqlClientListener for diagnostic logging #914

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

Merged
merged 10 commits into from
Sep 2, 2023

Conversation

MaddyDev
Copy link
Contributor

@MaddyDev MaddyDev commented Aug 30, 2023

To enable the sql client logging, user needs to add the VerboseLogging and set it to true in config settings.
(Followed the implementation in sql tools service microsoft/sqltoolsservice#1544)

For #810


3. Restart your function and reproduce your issue

4. Get the log file and attach it to this issue. By default this will be in `%TMP%/LogFiles/Application/Functions/Host`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, looking at this it would be good to include instructions (for both this and the other logging message) for doing this in a deployed function too since they won't be the same. Not sure offhand what the easiest way to export the logs would be, so that might take some investigation.

In the meantime I think we can actually revert the change I had you add earlier about the Function App settings and instead specify that these instructions are for local development only. Then when we figure out a way for deployed functions we can come back and update both with those instructions.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding the note! Might be worth making an actual issue to track updating this with instructions for deployed functions as well.

(although if we do that it might actually be best to just update the instructions in our docs and then link to those from here so we don't have to remember to keep both in sync)


3. Restart your function and reproduce your issue

4. Get the log file and attach it to this issue. By default this will be in `%TMP%/LogFiles/Application/Functions/Host`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding the note! Might be worth making an actual issue to track updating this with instructions for deployed functions as well.

(although if we do that it might actually be best to just update the instructions in our docs and then link to those from here so we don't have to remember to keep both in sync)

@MaddyDev MaddyDev merged commit 0cc478c into main Sep 2, 2023
@MaddyDev MaddyDev deleted the maddy/enableVerboseLoggingSTS branch September 2, 2023 00:17
@MaddyDev
Copy link
Contributor Author

MaddyDev commented Sep 2, 2023

added #917 for us to track the hosted scenario docs.

PBBlox pushed a commit to PBBlox/azure-functions-sql-extension that referenced this pull request Apr 6, 2025
* add SqlClientListener

* add const VerboseLogging

* update var name

* just log the event

* move logging to client

* add Needs Connection Logs label

* remove unused telemetry

* simplify logging

* remove unused directive

* add local deployment note
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.

2 participants