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

(#933) Remove duplicate output from console and Chocolatey GUI logs #954

Draft
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

corbob
Copy link
Member

@corbob corbob commented Aug 26, 2022

Description Of Changes

Remove duplicate output from the Chocolatey GUI Console output, and the Chocolatey GUI logs.

Motivation and Context

Messages were being duplicated in both the console output view, and the Chocolatey GUI logs.

Testing

Note: This performs an upgrade by creating the upgraded package after it's installed in Chocolatey GUI due to discovering #953 whereby we can't seem to specify the version.

Second note: The package used here is a series of outputs with 30 second sleeps between and after them. This allows you to watch/monitor the logs without needing to be hyper vigilant and risk missing the output.

  1. git clone https://gist.github.com/110756b357445cbaa815dbefe7e7c69b.git
  2. choco pack 110756b357445cbaa815dbefe7e7c69b/delayed.nuspec
  3. choco source add -n delayedTest -s $PWD/110756b357445cbaa815dbefe7e7c69b
  4. Launch Chocolatey GUI
  5. Navigate to the new delayedTest source
  6. Install delayed package
  7. Monitor that the console output is not doubled.
  8. Verify that output is in C:\ProgramData\Chocolatey GUI\Logs\ChocolateyGui.<date>.log
  9. Verify that output is in C:\ProgramData\chocolatey\logs\chocolatey.log
  10. choco pack 110756b357445cbaa815dbefe7e7c69b/delayed.nuspec --version 10.1.1
  11. Perform an upgrade of delayed package
  12. Ensure that output is not doubled, and in both of the previously mentioned logs
  13. Perform a reinstall of delayed package
  14. Ensure that output is not doubled, and in both of the previously mentioned logs
  15. Perform an uninstall of delayed package
  16. Ensure that output is not doubled, and in both of the previously mentioned logs
  17. choco source delete -n delayedTest

Change Types Made

  • Bug fix (non-breaking change)
  • Feature / Enhancement (non-breaking change)
  • Breaking change (fix or feature that could cause existing functionality to change)
  • PowerShell code changes.

Related Issue

Fixes #933

Change Checklist

  • Requires a change to the documentation
  • Documentation has been updated
  • Tests to cover my changes, have been added
  • All new and existing tests passed.
  • PowerShell v2 compatibility checked.

We can't just tell it not to append the logger. If we do that, we cause a regression of 697. But we can use the instance we already have, and just backup and restore the config.
@corbob corbob requested review from gep13 and AdmiringWorm and removed request for AdmiringWorm August 26, 2022 21:11
@corbob
Copy link
Member Author

corbob commented Aug 26, 2022

Putting this as Draft for now as the commits need to be cleaned up. I purposely left them in there for now to show the progress of getting to the point where it is now.

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.

Multiple duplicate lines in choco console UI (but not log file)
1 participant