maidsafe-archive / safe_dns

Other
8 stars 12 forks source link

MAID-1316 addition of debug statements #41

Closed mwaa closed 9 years ago

mwaa commented 9 years ago

Hey Using rust debug! macro to write the statements. Also included to library the dependency log which exposes the macro. Hopefully covered everything the task was about. Opened a new issue for the repo that the current tests fail. So i guess the pull requesting automated tests by CI will fail too.

My Bitcoin Address is 1JWJzJSYqau9MP6mfBpa5JogKU2giAWEn6

maidsafe-highfive commented 9 years ago

Thanks for the pull request, and welcome! The MaidSafe team is excited to review your changes, and you should hear from @krishnaIndia (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. The way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see CONTRIBUTOR.md for more information.

mwaa commented 9 years ago

@ustulation could you take a look at the new changes. Most of the code handles errors that may occur so as per your comment removed placed debug statements at such locations. Currently placed in location that might be a blocking function call.

ustulation commented 9 years ago

nice one @mwaa .. You see statements like these: let response_getter = self.client.lock().unwrap().get(request, None); and then later: try!(response_getter.get())

This is where the debug statements would really shine. Because that last one will block for ever if the network does not return you data (for whatever reason) .. The term forever is of-course implementation defined but you get the point. So it will be far more useful if you could just read through such functions to grab the essence and then summarise what those gets will be doing for us, in a debug statement before them somewhere. If you could do that here and in any other crates that you plan to implement these, it would be great .. On a side note: I do hope you started all the JIRA tasks for all PRs you plan submit though (because i track things from there).

mwaa commented 9 years ago

@ustulation Thanks i really hadn't seen this statements earlier try!(response_getter.get()). Will skim through the code and place the debug statements. Yes i have started all tasks(2) and will be pushing final changes by end of day

mwaa commented 9 years ago

@ustulation could you check if satisfactory?

mwaa commented 9 years ago

@ustulation sorry about the spaces my ide was stripping them out. Fixed it

ustulation commented 9 years ago

np .. if you can pull the latest master and merge into this one, and then check if travis passes. If so, assign the task to me in JIRA by putting it In Review (Don't forget to do a cargo update locally to troubleshoot if anything).. Looks good for a merge.

ustulation commented 9 years ago

r? @ustulation

ustulation commented 9 years ago

And of-course resolve the conflicts too