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

Save log files to the query history directory #1178

Merged
merged 4 commits into from
Mar 3, 2022

Conversation

aeisenberg
Copy link
Contributor

@aeisenberg aeisenberg commented Mar 1, 2022

This commit deprecates the the cutsom log directory option by saving
all log files with query history.

There is a simplification of the OutputChannelLogger since it no
longer needs to manage deleting log files on exit.

Also, the codeQL.runningQueries.customLogDirectory is marked as
deprecated. If this value is being used, a warning message is popped
up after the query completes.

Fixes #1174

Checklist

  • CHANGELOG.md has been updated to incorporate all user visible changes made by this pull request.
  • Issues have been created for any UI or other user-facing changes made by this pull request.
  • [Maintainers only] If this pull request makes user-facing changes that require documentation changes, open a corresponding docs pull request in the github/codeql repo and add the ready-for-doc-review label there.

@aeisenberg aeisenberg requested a review from a team as a code owner March 1, 2022 22:44
@aeisenberg
Copy link
Contributor Author

@edoardopirovano, @angelapwen, the changes here should make it easier to store structured logs in each query history folder. I would have done it myself, but I wasn't sure how to specify a different log file per query.

@aeisenberg aeisenberg force-pushed the aeisenberg/log-history branch 2 times, most recently from 4303608 to 3b6021b Compare March 1, 2022 23:59
Copy link
Contributor

@shati-patel shati-patel left a comment

Choose a reason for hiding this comment

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

Thanks for tidying this up! A few very small optional comments, but I think this looks good 👍🏽

(Once tests pass!)

extensions/ql-vscode/package.json Show resolved Hide resolved
extensions/ql-vscode/src/run-queries.ts Outdated Show resolved Hide resolved
extensions/ql-vscode/src/run-queries.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@edoardopirovano edoardopirovano left a comment

Choose a reason for hiding this comment

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

In addition Shati's comments, a minor typo I spotted.

@@ -68,7 +66,7 @@ export class QueryServerClient extends DisposableObject {
this.queryServerStartListeners.push(e);
}

public activeQueryName: string | undefined;
public activeQueryLogFIle: string | undefined;
Copy link
Contributor

Choose a reason for hiding this comment

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

typo: FIle -> File

This commit deprecates the the cutsom log directory option by saving
all log files with query history.

There is a simplification of the `OutputChannelLogger` since it no
longer needs to manage deleting log files on exit.

Also, the `codeQL.runningQueries.customLogDirectory` is marked as
deprecated. If this value is being used, a warning message is popped
up after the query completes.
@aeisenberg aeisenberg force-pushed the aeisenberg/log-history branch 2 times, most recently from b4f63e8 to b2b8625 Compare March 3, 2022 15:57
Allows users to explore the contents and all artifacts of the query
that was just run.
Add new command to open the query history directory
@aeisenberg aeisenberg requested a review from a team as a code owner March 3, 2022 16:00
@aeisenberg aeisenberg merged commit 5ad754a into main Mar 3, 2022
@aeisenberg aeisenberg deleted the aeisenberg/log-history branch March 3, 2022 16:14
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.

Error when displaying log from a previous VS Code run after restarting
3 participants