kblincoe / VisualGit_SE701_3

0 stars 0 forks source link

Update console logging #105

Open kathrynjaggar opened 6 years ago

kathrynjaggar commented 6 years ago

Issue description:

Currently, there are console.log() occurrences throughout the project that are outdated or have potential to be of more use to a reader. Examples include;

screen shot 2018-03-22 at 4 47 49 pm

Recommended solution:

Many of these statements can be simply removed, however for usability the remaining statements should be updated to include more useful information. For example, rather than logging simply the error to the console some information regarding the operation attempted would be helpful, perhaps even the file and line number where this log can be found. e.g. console.log("REPO.JS, LINE 49. Attempting to clone repo, the error is" + err)

Tagging @softeng-701 for approval.

softeng-701 commented 6 years ago

@kathrynjaggar Approved

Long315 commented 6 years ago

Sorry, I don't think just adding the file name and line number can solve the problem because both file name and line number can change especially for line number when someone adds or deletes some code in the file, the line number surely would be out of date. I think we should create a global log function which can decorate the console.log function and replace the console.log function with this new one. It should be easier to turn on or off the output of log. what do you think? @kathrynjaggar @softeng-701

kathrynjaggar commented 6 years ago

@Long315 That sounds like a good idea to me, what does @softeng-701 think?

softeng-701 commented 6 years ago

@kathrynjaggar @Long315 Sounds reasonable