Open Bug 1919868 Opened 5 months ago Updated 5 months ago

Integrate MOZ_LOG Usage into GeckoView / Fenix as a Development Tool

Categories

(GeckoView :: General, task)

All
Android
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).

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.

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.

See Also: → 1892943

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.

Summary: Integrate MOZ_LOG Usage into GeckoView / Fenix → Integrate MOZ_LOG Usage into GeckoView / Fenix as a Development Tool

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.

(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 in Logging.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.

You need to log in before you can comment on or make changes to this bug.