Open Bug 1060335 Opened 10 years ago Updated 2 years ago

Allow enabling PR logging via Android properties

Categories

(NSPR :: NSPR, defect)

ARM
Gonk (Firefox OS)
defect

Tracking

(Not tracked)

People

(Reporter: gsvelto, Unassigned)

References

Details

Currently the only way to enable PR logging is by setting the NSPR_LOG_MODULES and NSPR_LOG_FILE environment variables. On Android/FxOS this is not a very practical approach (see also bug 1003675 and bug 977589).

To simplify accessing the logs we might introduce some Android properties that would cover the same roles. For example 'nspr.log.modules' might be used to provide the data normally passed in NSPR_LOG_MODULES and 'nspr.log.file' similarly for NSPR_LOG_FILE. We could also consider persistent properties with similar names.

A quick design would call for _PR_InitLog() to read NSPR_LOG_MODULES first, if it's not defined check for nspr.log.modules and finally if it's also not defined persist.nspr.log.modules. This way NSPR_LOG_MODULES would always override the contents of nspr.log.modules if defined, and nspr.log.modules would override persist.nspr.log.modules. A similar logic would be applied to NSPR_LOG_FILE, nspr.log.file and persist.nspr.log.file.
See Also: → OneLogger

The bug assignee is inactive on Bugzilla, so the assignee is being reset.

Assignee: wtc → nobody
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.