Integrate MOZ_LOG Usage into GeckoView / Fenix as a Development Tool
Categories
(GeckoView :: General, task)
Tracking
(Not tracked)
People
(Reporter: olivia, Unassigned)
References
(Blocks 1 open bug)
Details
- MOZ_LOG logs do not show up in logcat without making manual changes to code.
- To enable MOZ_LOG now:
- Add this line CreateOrGetModule("modulename")->SetLevel(LogLevel::Verbose); to this section of code for a temporary solution to see MOZ_LOG logging.
- Turn on
logging.config.modules
- (Partially documented in GeckoView docs).
- To enable MOZ_LOG now:
This bug is to make it easier to turn on MOZ_LOG for Android. Maybe make it a build option or something? Not sure the best path for allowing developers to enable this locally.
Reporter | ||
Comment 1•5 months ago
|
||
Engineers familiar with GeckoView field questions about MOZ_LOG
around every couple of months or so. This bug impacts platform engineers. It is a request that appears fairly frequently from a developer ergonomics concern.
I tagged it to monorepo-enhancements
for triage.
Reporter | ||
Comment 2•5 months ago
|
||
Engineers familiar with GeckoView field questions about MOZ_LOG
around every couple of months or so. This bug impacts platform engineers and engineers working with Gecko the most. It is a request that appears fairly frequently from a developer ergonomics concern.
I tagged it to monorepo-enhancements
for triage.
Reporter | ||
Comment 3•5 months ago
•
|
||
Was this fixed in bug 1894703 and only logging.config.modules
is needed now? With no change needed in Logging.cpp
? If so, we can change this ticket to updating Android documentation on this.
Comment 4•5 months ago
|
||
(In reply to Olivia Hall [:olivia] from comment #3)
Was this fixed in bug 1894703 and only
logging.config.modules
is needed now? With no change needed inLogging.cpp
? If so, we can change this ticket to updating Android documentation on this.
I don't think the changes I made to Logging.cpp did anything; I think the pref is sufficient. Well, mostly - if you want to log on startup you need to edit that pref and then another pref that stops it from being cleared on restart, which is pretty important.
It would also be really nice to include in the documentation the incantation that would let you launch the browser from the command line with the preference(s) set, to avoid manual steps all the time.
Description
•