Closed Bug 972939 Opened 6 years ago Closed 6 years ago

Add preliminary documentation for structured logging

Categories

(Testing :: Mozbase, defect)

x86_64
Linux
defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED
mozilla30

People

(Reporter: wlach, Assigned: jgraham)

Details

Attachments

(1 file, 1 obsolete file)

As discussed in the mozbase meeting today, let's add some class-level documentation about the structured logging for mozlog, as well as some examples of how to use it.

For now it can go in a seperate section, as we're still keeping the old log stuff for backwards compatibility.

Existing documentation here:

https://github.com/mozilla/mozbase/blob/master/docs/mozlog.rst (canonical location will be testing/mozbase/docs/mozlog.rst soon)
Attached patch 972939.diff (obsolete) — Splinter Review
Documentation as part of the mozbase docs.
Attachment #8379020 - Flags: review?(wlachance)
Comment on attachment 8379020 [details] [diff] [review]
972939.diff

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

I think this looks good. I only really have one comment on the documentation itself. (I might have more suggestions later after actually trying to use this documentation)

I really think we need some kind of higher-level discussion in the docs about the relationship of "structured" logging to the existing logging, and when each should be used. If we want to deprecate the old mozlog functionality in favour of this, we should really just call that out so as to guide people in the right direction.

::: testing/mozbase/docs/mozlog_structured.rst
@@ +123,5 @@
> +    ``WARNING``, ``INFO``, ``DEBUG``).
> +
> +  ``message``
> +    Text of the log message.
> +

A few end-to-end examples of what a log message looks like might be helpful here.
Attachment #8379020 - Flags: review?(wlachance) → review+
Attached patch 972939-1.diffSplinter Review
Same patch with updated commit message.
Attachment #8379020 - Attachment is obsolete: true
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/b9398216b902
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla30
You need to log in before you can comment on or make changes to this bug.