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

Log gulp task failures to file regardless of UF_MODE #918

Closed
Silic0nS0ldier opened this issue Dec 22, 2018 · 3 comments
Closed

Log gulp task failures to file regardless of UF_MODE #918

Silic0nS0ldier opened this issue Dec 22, 2018 · 3 comments
Assignees
Labels
developer experience The one building with UF
Milestone

Comments

@Silic0nS0ldier
Copy link
Member

There have been a few instances where a gulp task has failed and cannot be debugged due to lack of information. This is particularly annoying when issues only occur in a specific UF_MODE or only happen once (leaving the root cause unknown).

The solution here is to store all logged messages and dump them into a log file should things go wrong. Some work towards centralised logging has already been started. The hardest part of thing will be catching what gulp itself logs (we should however be able to provide our own logger), and forcing everything to log at maximum without everything also being dumped into the console.

@Silic0nS0ldier Silic0nS0ldier added the developer experience The one building with UF label Dec 22, 2018
@Silic0nS0ldier Silic0nS0ldier added this to the 4.3.0 milestone Dec 22, 2018
@Silic0nS0ldier
Copy link
Member Author

I'm thinking that getting this into 4.2 may be in our best interest as it will ensure that everything can be logged. The major refactor underpins the importance of this. So to get the ball rolling, some notes.

  • Log location should match up with the rest of UserFrosting.
  • Need to determine what the logging level should be.
  • Is everything currently covered by the global log function? Are we controlling verbosity of anything that directly writes to console?

@Silic0nS0ldier Silic0nS0ldier self-assigned this Feb 20, 2019
@Silic0nS0ldier
Copy link
Member Author

Changing the output of execSync has been proving troublesome, however the way the source linked works means that you don't have to directly mess with it. This may provide a solution, provided it doesn't conflict with Gulp's logging system. https://github.com/monolithed/redirect-output/blob/master/index.ts

@Silic0nS0ldier
Copy link
Member Author

Much to my irritation, there doesn't appear to be a way to capture all output, specifically if a child process (like using exec) is involved,

Related:

Everything emitted by gulp and us however emitted fine, which gives us rather decent coverage of our own tools. Will certainly help for debugging and support in certain scenarios.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
developer experience The one building with UF
Projects
None yet
Development

No branches or pull requests

1 participant