Closed Bug 1439411 Opened 6 years ago Closed 6 years ago

[mozlog] Essential documentation missing from CLI output

Categories

(Testing :: Mozbase, enhancement)

Version 3
enhancement
Not set
normal

Tracking

(firefox60 fixed)

RESOLVED FIXED
mozilla60
Tracking Status
firefox60 --- fixed

People

(Reporter: jugglinmike, Assigned: jugglinmike)

Details

Attachments

(1 file, 3 obsolete files)

The output formatters provided by mozlog are well-documented in the online help
guide, but this information is not available to users in the CLI. The
`add_logging_group` method extends the consuming project's command-line
interface without referencing mozlog itself. This means consumers may not have
a means to discover the additional information, and even in cases where they
can infer this connection, there is no indication of the stability of the
behavior.

Extend the description of the built-in output formatters to explain their
origin and reference the relevant documentation.
The previously-submitted patch contained a syntax error. Apologies for the noise
Assignee: nobody → mike
Attachment #8952201 - Attachment is obsolete: true
Attachment #8952201 - Flags: review?(james)
Attachment #8952203 - Flags: review?(james)
Comment on attachment 8952203 [details] [diff] [review]
0001-mozlog-Document-built-in-CLI-logging-options.patch

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

::: testing/mozbase/mozlog/mozlog/commandline.py
@@ +131,5 @@
>      group_description = ("Each option represents a possible logging format "
>                           "and takes a filename to write that format to, "
> +                         "or '-' to write to stdout. Some options are "
> +                         "provided by the mozlog utility; see %s " % DOCS_URL +
> +                         "for extended documentation.")

I think that 

   group_description = ("Each option represents a possible logging format "
                         "and takes a filename to write that format to, "
                         "or '-' to write to stdout. Some options are "
                         "provided by the mozlog utility; see %s "
	                 "for extended documentation." % DOCS_URL)

works and looks better
Attachment #8952203 - Flags: review?(james)
(In reply to James Graham [:jgraham] from comment #3)
> I think that 
> 
>    group_description = ("Each option represents a possible logging format "
>                          "and takes a filename to write that format to, "
>                          "or '-' to write to stdout. Some options are "
>                          "provided by the mozlog utility; see %s "
> 	                 "for extended documentation." % DOCS_URL)
> 
> works and looks better

I agree!
Attachment #8952203 - Attachment is obsolete: true
Attachment #8952216 - Flags: review?(james)
Attachment #8952216 - Flags: review?(james) → review+
Pushed by aciure@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/25a1c4b0e2af
[mozlog] Document built-in CLI logging options r=jgraham
Keywords: checkin-needed
Sorry for the lint failure. This patch corrects it:

>     $ ./mach lint -l flake8
>     ✖ 0 problems (0 errors, 0 warnings)
Attachment #8952216 - Attachment is obsolete: true
Attachment #8954053 - Flags: review?(james)
Attachment #8954053 - Flags: review?(james) → review+
Pushed by archaeopteryx@coole-files.de:
https://hg.mozilla.org/integration/mozilla-inbound/rev/99444f1ed75a
[mozlog] Document built-in CLI logging options r=jgraham
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/99444f1ed75a
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla60
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: