ChocolateyGUI icon indicating copy to clipboard operation
ChocolateyGUI copied to clipboard

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

Open corbob opened this issue 2 years ago • 1 comments

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

  • [x] 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.

corbob avatar Aug 26 '22 21:08 corbob

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.

corbob avatar Aug 26 '22 21:08 corbob