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

Have debug append to file. #89

Merged
merged 3 commits into from
Feb 1, 2022

Conversation

ampersarnie
Copy link
Member

@ampersarnie ampersarnie commented Jan 21, 2022

Description

When executing a command (wp-cypress start for example), fs.createWriteStream() would overwrite the debug.log file and start afresh causing all previous output to be lost. While not inherently a problem locally, the problem starts to really show when running in CI environments where you may have multiple commands running. Due to the debug.log being overwritten, we would need to capture the output between each command - sometimes that's not always possible. So appending that output becomes the better option. I believe the debug should persist for as long as required or possible without being overwritten.

Change Log

  • Add append (a) flag to write stream.
  • Change close event to only write on error.

Types of changes (if applicable):

  • Bug fix (non-breaking change which fixes an issue).
  • New feature (non-breaking change which adds functionality).
  • Breaking change (fix or feature that would cause existing functionality to not work as expected).

Checklist (if applicable):

  • Meets provided linting standards.

@ampersarnie ampersarnie merged commit cd6cee9 into bigbite:1.0.0 Feb 1, 2022
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.

1 participant