Closed Bug 583636 Opened 14 years ago Closed 14 years ago

NSPR logging for cookies doesn't work

Categories

(Core :: Networking: Cookies, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: asqueella, Assigned: Biesinger)

Details

Attachments

(1 file)

Following the instructions from http://www.mozilla.org/projects/netlib/cookies/cookie-log.html :

export NSPR_LOG_MODULES=cookie:4
export NSPR_LOG_FILE=/path/to/log
/path/to/firefox-bin

produces an empty file.

This regressed between 
2010-06-30-03-mozilla-central
2010-07-01-03-mozilla-central

http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=580205b95ceb&tochange=82edf5bd1abe

probably the e10s merge...
blocking2.0: --- → ?
Is this in an opt build?  Are IPC headers including prlog.h somewhere or something?  :(
Component: Networking: Cookies → IPC
QA Contact: networking.cookies → ipc
OS: Mac OS X → All
Hardware: x86 → All
None of the core IPC code (ipc/glue/*) or the C++ it generates uses prlog, but "IPC code" encompasses a fair amount of stuff, some of it might be using prlog or pulling in other headers that do.
Well, the relevant headers cookies include are "mozilla/net/NeckoCommon.h" and "mozilla/net/CookieServiceChild.h" plus whatever those include...
OK, those don't include prlog.h (or more precisely the .i for the cookie service shows prlog.h being included where it should be).  So the problem is really somewhere in cookie-land....
Component: IPC → Networking: Cookies
QA Contact: ipc → networking.cookies
Attached patch patchSplinter Review
So, this does fix the bug for me. I'm not sure why bz's testing showed a different result; I see prlog.h included from ipc/chromium/src/base/logging.h as well as dist/include/mozilla/BlockingResourceBase.h
Assignee: nobody → cbiesinger
Status: NEW → ASSIGNED
Attachment #463171 - Flags: review?(dwitte)
Comment on attachment 463171 [details] [diff] [review]
patch

r=dwitte
Attachment #463171 - Flags: review?(dwitte) → review+
We should really be defining FORCE_PR_LOGGING in the makefile for a directory, not in any of the headers or .cpp files. See e.g. http://mxr.mozilla.org/mozilla-central/source/dom/plugins/Makefile.in#152
I guess that means we'd have to do it for all of netwerk/, since netwerk/cookie doesn't have its own Makefile anymore... I imagine that'd be OK though.
(In reply to comment #8)
> I guess that means we'd have to do it for all of netwerk/, since netwerk/cookie
> doesn't have its own Makefile anymore... I imagine that'd be OK though.

What's http://mxr.mozilla.org/mozilla-central/source/netwerk/cookie/Makefile.in then?

We could do it for all of netwerk, but that will enable several log modules that weren't previously enabled. Do we still care about codesize? :-)
Also, that DOM makefile will enable logging even when --disable-logging was specified, is that intentional?
(In reply to comment #9)
> What's http://mxr.mozilla.org/mozilla-central/source/netwerk/cookie/Makefile.in
> then?

Oh, right, I thought we'd removed that but we only moved netwerk/cookie/src to netwerk/cookie...
Comment on attachment 463171 [details] [diff] [review]
patch

OK, I'll stay with this patch because in a makefile I can't check for MOZ_LOGGING.

Asking for approval - a trivial patch to make sure that cookie logging is enabled in nightlies/releases to make investigating bugs possible.
Attachment #463171 - Flags: approval2.0?
http://hg.mozilla.org/mozilla-central/rev/ad8051aa2e3a
Status: ASSIGNED → RESOLVED
blocking2.0: ? → ---
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: