Skip to content

Conversation

@SenecaAnderson
Copy link
Contributor

Summary

Originally, the mcodeApp function in src/application/app.js only changed the logger level if debug was true, and didn't change it back to 'info' if debug was false. Since the UI can run extraction multiple times in a row, this caused a bug.

New behavior

The mcodeApp function now changes the logger level back to 'info' if the debug flag is false.

Code changes

The if statement on line 42 of src/application/app.js was changed to a ternary operator.

Testing guidance

In the root package.json file of code-extraction-ui, set the location of mcode-extraction-framework to "file:local_file_path_to_framework". Run npm install, then npm start. Click on "Extract New", check "Log output debugging information", and then click "Submit". Either look at the terminal to see the logs or, if on the logger-display branch, click on "Log File" in the sidebar of the result page. Click the "Exit" button on the result page, then run extraction again with "Log debugging information" unchecked. Regardless of the order in which you run extraction with and without debug-level logs, as well as the number of times you repeat this process, the proper logs should show up.

@Dtphelan1 Dtphelan1 changed the base branch from main to develop June 18, 2021 21:30
@Dtphelan1 Dtphelan1 self-assigned this Jun 21, 2021
@jafeltra jafeltra self-assigned this Jun 21, 2021
Copy link
Contributor

@jafeltra jafeltra left a comment

Choose a reason for hiding this comment

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

This looks good and works as we want it to in the Extraction UI! I just had one minor suggestion.

Co-authored-by: Julia Afeltra <[email protected]>
Copy link
Contributor

@jafeltra jafeltra left a comment

Choose a reason for hiding this comment

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

Looks good! Thanks for updating that!

@jafeltra jafeltra merged commit 7190191 into develop Jun 22, 2021
@jafeltra jafeltra deleted the debug-flag-bug branch June 22, 2021 15:48
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.

4 participants