automatically configure prosthesis logging #378

Closed
mykmelez opened this Issue Mar 14, 2013 · 0 comments

Projects

None yet

1 participant

@mykmelez
Member

Configuring prosthesis console logging is cumbersome, as it relies on hardcoded flags in each individual script. Prosthesis should automatically enable logging when run via make run and in preview builds, but disable it in release builds.

One way to do this would be to define a pref, r2d2b2g.console.enabled, that scripts use to determine whether or not to log. Then create a prefs file, prosthesis/defaults/preferences/dev.js, that sets it to true; and include that file in the XPI when building prosthesis; but ignore it if the Make variable RELEASE is defined, so I can create release packages that don't log via RELEASE=1 make && make package.

Another option would be to send messages to the Firefox process instead of dumping them in the Simulator process. Then the Simulator addon can console.log them, which will automatically do the right thing (since the Simulator addon uses the Add-on SDK, which adjusts the log level for its console object based on how the addon was installed).

@mykmelez mykmelez was assigned Apr 9, 2013
@mykmelez mykmelez closed this in 5ac3c0c Apr 10, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment