Closed Bug 1171298 Opened 9 years ago Closed 9 years ago

Show the ConsoleAPI prefix in web/browser consoles

Categories

(DevTools :: Console, defect)

defect
Not set
normal

Tracking

(firefox41 fixed)

RESOLVED FIXED
Firefox 41
Tracking Status
firefox41 --- fixed

People

(Reporter: MattN, Assigned: MattN)

Details

Attachments

(2 files)

The ConsoleAPI prefix currently only shows in the console via dump but should also appear in the Web/Browser Consoles.
Bug 1171298 - Show the ConsoleAPI message prefix in web/browser consoles. r=bgrins
Attachment #8615020 - Flags: review?(bgrinstead)
(In reply to Matthew N. [:MattN] from comment #2)
> Try push:
> https://treeherder.mozilla.org/#/jobs?repo=try&revision=fdacdc578050

The jetpack test-plain-text-console.js test seems to be failing in that push.  Had to figure out how to run it, but it seems to pass locally for me.  Anyway, here's the incantations to test it locally

cd addon-sdk/source
source bin/activate
cfx test --binary /path/to/objdir/dist/Nightly.app -f test-plain-text-console.js

I did another try push, although I don't know why it would be any better: https://treeherder.mozilla.org/#/jobs?repo=try&revision=3193d59fb3d4
Attachment #8615020 - Attachment description: MozReview Request: Bug 1171298 - Show the ConsoleAPI message prefix in web/browser consoles. r=bgrins → MozReview Request: Bug 1171298 - Show the ConsoleAPI message prefix in web/browser consoles. r=bgrins,Mossop
Attachment #8615020 - Flags: review?(dtownsend)
Comment on attachment 8615020 [details]
MozReview Request: Bug 1171298 - Show the ConsoleAPI message prefix in web/browser consoles. r=bgrins,Mossop

Bug 1171298 - Show the ConsoleAPI message prefix in web/browser consoles. r=bgrins,Mossop
The colon and space now get added by default for dump output.
Attachment #8615020 - Flags: review?(dtownsend) → review+
Comment on attachment 8615020 [details]
MozReview Request: Bug 1171298 - Show the ConsoleAPI message prefix in web/browser consoles. r=bgrins,Mossop

https://reviewboard.mozilla.org/r/10147/#review9019

Looks ok and I assume the tests pass
Comment on attachment 8615020 [details]
MozReview Request: Bug 1171298 - Show the ConsoleAPI message prefix in web/browser consoles. r=bgrins,Mossop

https://reviewboard.mozilla.org/r/10147/#review9011

I confirmed that debugging a newer browser from an older client (via connect screen) and that debugging an older server with a new client (via WebIDE) doesn't break anything.  LGTM if the tests are green

::: browser/devtools/webconsole/test/browser_console_consolejsm_output.js:145
(Diff revision 1)
> +  let ConsoleAPI = Cu.import("resource://gre/modules/devtools/Console.jsm", {}).ConsoleAPI;

Nit: to get closer to 80 chars:

let {ConsoleAPI} = Cu.import("resource://gre/modules/devtools/Console.jsm", {});

::: browser/devtools/webconsole/test/head.js:1296
(Diff revision 1)
> +      info(aElement.className);

Looks like some extra info's here.  If these are intentional, then please add some more context in the messages.

::: browser/themes/shared/devtools/webconsole.inc.css:30
(Diff revision 2)
> -  margin: 4px 6px 0 0;
> +  margin: 3px 6px 0 0;

Just a note: we took a look at this alignment on the timestamps and prefixes when testing across a variety of log types and zoom levels, and 3px margin top did seem better aligned with the message content than the current 4px
Attachment #8615020 - Flags: review?(bgrinstead) → review+
https://hg.mozilla.org/mozilla-central/rev/62b2ce393ed3
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 41
Commit pushed to master at https://github.com/mozilla/addon-sdk

https://github.com/mozilla/addon-sdk/commit/f5f1636d210dd46e5c3178cca407765200579246
Bug 1171298 - Show the ConsoleAPI message prefix in web/browser consoles. r=bgrins,Mossop
Attached image console-log-prefix.png
screenshot of the feature
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: