From d0073ef9e55a4553ea533499e518c0f39839200d Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Tue, 31 Mar 2020 13:23:35 -0700 Subject: [PATCH] chore(firefox): update cheatsheet with logging instructions (#1609) --- browser_patches/firefox/cheatsheet.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/browser_patches/firefox/cheatsheet.md b/browser_patches/firefox/cheatsheet.md index 02321e3a6d..c53f55abde 100644 --- a/browser_patches/firefox/cheatsheet.md +++ b/browser_patches/firefox/cheatsheet.md @@ -13,3 +13,16 @@ In native code use ```c++ nsTraceRefcnt::WalkTheStack(stderr); ``` + +If the stack trace is still mangled `cat` it to `tools/rb/fix_linux_stack.py` + +#### [Logging](https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Gecko_Logging) + +```bash +MOZ_LOG=nsHttp:5 +``` +Module name is a string passed to the `mozilla::LazyLogModule` of the corresponding component, e.g.: + +```c++ +LazyLogModule gHttpLog("nsHttp"); +```