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

Improve logging output of function #111

Merged
merged 15 commits into from
Nov 21, 2023
Merged

Improve logging output of function #111

merged 15 commits into from
Nov 21, 2023

Conversation

Jaclynpqc
Copy link
Collaborator

@Jaclynpqc Jaclynpqc commented Nov 10, 2023

This pull request enhances the logging output in the main.py file by strategically placing logger.debug statements in various functions. The improved logging provides detailed information about the execution flow, enabling easier debugging and troubleshooting.

I added logging statements relating to debug info, debug destination, file path directory, current version using:
For example,

Display verbose output? False
Debug level? DEBUG
Debug destination? SYSLOG
Current Chasten version 0.2.0
Using XPath version 2.0

I also add more logging statements at key points of the operation that likely going to cause error.
I attached a screenshot below, in which you could see two server CONSOLE and SYSLOG run at the same time for chasten analyze. While CONSOLE returns the checked patterns, SYSLOG returns some logging statement and info that might come in handy when troubleshooting and debugging the code:
Screenshot 2023-11-21 at 3 02 12 PM

@Jaclynpqc Jaclynpqc self-assigned this Nov 10, 2023
@Jaclynpqc Jaclynpqc linked an issue Nov 10, 2023 that may be closed by this pull request
@Jaclynpqc Jaclynpqc added the enhancement New feature or request label Nov 10, 2023
@Jaclynpqc Jaclynpqc added the ready-for-review This pull request is ready for review label Nov 14, 2023
@Jaclynpqc Jaclynpqc changed the title WIP: Improve logging output of function Improve logging output of function Nov 14, 2023
laurennevill
laurennevill previously approved these changes Nov 14, 2023
@tuduun
Copy link
Collaborator

tuduun commented Nov 14, 2023

@Jaclynpqc Can you please provide the final version of the output and what it looks like? Although I can see the changes in the Files Changed tab, it may be easier for most people to see what it looks like. It may be helpful to display the before and after images of the improved logging system.

@gkapfham gkapfham self-requested a review November 14, 2023 18:43
Copy link
Collaborator

@gkapfham gkapfham left a comment

Choose a reason for hiding this comment

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

Hello @Jaclynpqc, can you please give examples of the output that this logging output would produce? Can you also confirm that you have tested it and shown that it works for all three of the major operating systems that we support? Also, can you please confirm that it works for both console logging and the syslog server?

@Jaclynpqc Jaclynpqc changed the title Improve logging output of function WIP: Improve logging output of function Nov 14, 2023
@Jaclynpqc Jaclynpqc added in-progress Work is actively happening on this issue and removed ready-for-review This pull request is ready for review labels Nov 14, 2023
@Jaclynpqc Jaclynpqc added the help wanted Extra attention is needed label Nov 14, 2023
@Jaclynpqc Jaclynpqc changed the title WIP: Improve logging output of function Improve logging output of function Nov 14, 2023
@Jaclynpqc Jaclynpqc removed the in-progress Work is actively happening on this issue label Nov 14, 2023
@AlishChhetri
Copy link
Collaborator

This feature works on a linux device.

@Finley8
Copy link
Collaborator

Finley8 commented Nov 14, 2023

This feature works on a Windows device!

@boulais01
Copy link
Collaborator

@Jaclynpqc Would you mind posting examples here of the elements @gkapfham requested, so we can close that request change?

@Jaclynpqc Jaclynpqc removed the help wanted Extra attention is needed label Nov 16, 2023
@Jaclynpqc
Copy link
Collaborator Author

@gkapfham @boulais01 I have tested and confirmed that my implementation works on all three major OS systems, and on both CONSOLE and SYSLOG. This pull request enhances the logging output in the main.py file by strategically placing logging statements in various functions. The improved logging provides detailed information about the execution flow, enabling easier debugging and troubleshooting.

I added logging statements relating to debug info, debug destination, file path directory, and current version. For example:

Debug level? DEBUG
Debug destination? SYSLOG
Current Chasten version 0.2.0
Using XPath version 2.0

I also added more logging statements at key points of the operation that likely going to cause errors.

@laurennevill laurennevill added the ready-for-review This pull request is ready for review label Nov 17, 2023
@gkapfham gkapfham self-requested a review November 17, 2023 14:33
Copy link
Collaborator

@gkapfham gkapfham left a comment

Choose a reason for hiding this comment

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

Hello @Jaclynpqc, thanks for this PR, it is helpful and now close to being merged. The main concern that I see right now is that the PR also includes an analysis.md file. This file was automatically created by the chasten program because it was running a feature that @Poiuy7312 created. Since this is a derived/generated file we want to make sure that we do not include it inside of our repository. Can you please remove this file and then request another review? Once you have made this change, I think that it should be ready for us to merge to the main trunk! Thanks!

@Jaclynpqc
Copy link
Collaborator Author

I have made additional changes to this feature. This PR is now ready to merge

Copy link
Collaborator

@AlishChhetri AlishChhetri left a comment

Choose a reason for hiding this comment

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

Looks great! I have run the tool on my computer, Linux OS, and it does execute the desired result.

Copy link
Collaborator

@laurennevill laurennevill left a comment

Choose a reason for hiding this comment

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

Nice work!

@laurennevill
Copy link
Collaborator

Once the changes are resolved, I can merge this

@laurennevill
Copy link
Collaborator

Once the changes are resolved, I can merge this

Oops, this also needs one more Professor/TL review

@tuduun tuduun self-requested a review November 21, 2023 20:06
Copy link
Collaborator

@tuduun tuduun left a comment

Choose a reason for hiding this comment

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

Good job on deleting the md file and displaying the output as @gkapfham requested!

@laurennevill laurennevill merged commit c0a7779 into master Nov 21, 2023
3 checks passed
@laurennevill laurennevill deleted the improve_logging branch November 21, 2023 20:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request ready-for-review This pull request is ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve the Logging Output that the Tool Produces
7 participants