chocolatey / ChocolateyGUI

A delicious GUI for Chocolatey
https://docs.chocolatey.org/en-us/chocolatey-gui/
Apache License 2.0
1.61k stars 249 forks source link

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

Open corbob opened 1 year ago

corbob commented 1 year ago

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

Related Issue

Fixes #933

Change Checklist

corbob commented 1 year ago

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.