Closed Bug 1057056 Opened 5 years ago Closed 5 years ago

mozlog docs on readthedocs don't include much of the StructuredLogger api

Categories

(Testing :: Mozbase, defect)

defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED
mozilla34

People

(Reporter: cmanchester, Assigned: cmanchester)

Details

Attachments

(1 file)

http://mozbase.readthedocs.org/en/latest/mozlog_structured.html used to include the log action methods "test_status", "test_end", etc., not sure what happened.
Motion to remove the old docs while we're at it?
This gets our logging methods back into the docs. The signatures are all "(*args, **kwargs)", which is accurate, but is there an accepted way to annotate some parameters as optional and any defaults?
Attachment #8478313 - Flags: feedback?(wlachance)
Assignee: nobody → cmanchester
Status: NEW → ASSIGNED
Comment on attachment 8478313 [details] [diff] [review]
Set __doc__ attribute of decorated structured logger methods.

Review of attachment 8478313 [details] [diff] [review]:
-----------------------------------------------------------------

This looks fine to me, it might be a good idea to add a comment explaining what you're try to accomplish as it's probably non-obvious.

I think the standard way of defining parameters in .rst is with the :param keyword. This stackoverflow article has some more thoughts on the subject: http://stackoverflow.com/questions/9195455/how-to-document-a-method-with-parameters
Attachment #8478313 - Flags: feedback?(wlachance) → feedback+
Comment on attachment 8478313 [details] [diff] [review]
Set __doc__ attribute of decorated structured logger methods.

Review of attachment 8478313 [details] [diff] [review]:
-----------------------------------------------------------------

Looks like the way to do this is: http://sphinx-doc.org/domains.html#signatures

But we have to do it by hand. Maybe we should get these docs in a saner state in the meantime?
Attachment #8478313 - Flags: review?(james)
Attachment #8478313 - Flags: review?(james) → review+
https://hg.mozilla.org/mozilla-central/rev/678b8dbcc0f6
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
You need to log in before you can comment on or make changes to this bug.