Open Bug 342368 Opened 18 years ago Updated 2 years ago

Need a way to append to the log file

Categories

(NSPR :: NSPR, enhancement)

enhancement

Tracking

(Not tracked)

People

(Reporter: wtc, Unassigned)

Details

NSPR opens the log file (specified with the environment
variable NSPR_LOG_FILE) with the following flags:

    PR_WRONLY|PR_CREATE_FILE|PR_TRUNCATE

(On Win32 it uses fopen to open the log file with the
"w" mode string.)  So the log file is always truncated
if it exists.

It would be good to have a way to tell NSPR to open
the log file without truncating it, that is, pass
the PR_WRONLY|PR_CREATE_FILE flags to PR_Open or the
"a" mode string to fopen.  I guess this could be
controlled by a new special log module "append" or
"notruncate".
As we add new log modules (this and the timestamp one), don't we need to take care to avoid conflicting with user defined modules?  Should we prefix the built-in module names with an underscore or something like that to better distinguish them?
QA Contact: wtchang → nspr
Severity: normal → S3

The bug assignee is inactive on Bugzilla, so the assignee is being reset.

Assignee: wtc → nobody
You need to log in before you can comment on or make changes to this bug.