Mach30/m30pm

add log output for `project create` command

Closed this issue · 5 comments

as to be able to debug errors encountered during project create

We have also mentioned adding a verbose output mode. In the interest of keeping the architecture simple, I think we should pick one of these approaches instead of doing both (for now).

I am leaning toward logging as the implementation to go with. My rationale is that logging would be easier to implement (given the recent work on the fs lib) and a more flexible use case (e.g. can collect multiple runs and compare them).

Specifications for Logging feature.

  • Add a setting field for managing logging to ProjectConfiguration, stored in package.json
  • Add a .logs/ directory for storing log files to createProject() CommandHistoryLogger::writeLog() and include it in .gitignore
  • I expect we will primarily be logging CommandHistories
  • We should record two copies of logs (raw data structures in form of yaml files and formatted views as md files)
  • Log filenames should formatted YYYYMMDD-HHMM-< function-name >-< logging-level >.< yaml | md > where time is in 24 hour time.
  • add test case for logging level, info, for descriptions that include quotes (as string) [closed as per ad84e1f]

I would like to develop a common view log view description to keep implementation simpler.

example log output from projectCreate() log.json

example log output from projectCreate() log.json

Can convert to yaml using yq -o=yaml log.json

closed as per ad84e1f