Closed Bug 8491 Opened 25 years ago Closed 25 years ago

[PP]Need a way to get PR_LOG output on the mac

Categories

(NSPR :: NSPR, defect, P3)

PowerPC
Mac System 8.5
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: dp, Assigned: sdagley)

Details

XPCOM used PR_LOG heavily for debugging. Esp since multiple threads are hitting
it. I have debugged numerous problems both for external developers and internal
with the log output.

I am stuck without it on the mac. Could we have some way, anyway at all, of
getting my PR_LOG outputs to a file.

...<dp on his knees> please please *really* please....
Status: NEW → ASSIGNED
Target Milestone: M8
Summary: Need a way to get PR_LOG output on the mac → [PP]Need a way to get PR_LOG output on the mac
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
PR_LOG wasn't working due to a lack of support for environment variables on the
Mac.  Since each log call checks the environment vars to see what modules are
supposed to be logged it would appear than none were.

Code now checked in to prenv.c/.h (added a public PR_PutEnv) and
nsCommandLineServiceMac.cpp to parse a psuedo command file for environment
variables.  This extends upon the work John McMullen did to provide the
equivalent of command line arguments for the Mac (where they, and environment
variables, are pretty much a foreign concept).

Usage:

When appRunner is launched with a document (e.g. dragging the file onto the
appRunner icon) it looks to see if the file type is 'TEXT' or the special 'CMDL'
type.  Each line of such a file is parsed to see if it begins with 'ARGS:' or
'ENV:'.  In the case of the former only one should occur per file while each
environment variable should be on a seperate line prefixed with ENV: such as
follows:

ARGS:-editor
ENV:envVar1=Fred
ENV:envVarJoe=Bob

PR_PutEnv will be called for each environment variable line so that PR_GetEnv can
be used later to retrieve them.  This will make PR_LOG happy and who knows, maybe
some other module may find this useful.
Target Milestone: M8 → ---
You need to log in before you can comment on or make changes to this bug.