Open Bug 203614 Opened 21 years ago Updated 2 years ago

Improve formatting of thread info at start of each logged line

Categories

(NSPR :: NSPR, defect)

PowerPC
macOS
defect

Tracking

(Not tracked)

People

(Reporter: bfowler, Unassigned)

Details

User-Agent:       Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.4b) Gecko/20030418 Chimera/0.7+
Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.4b) Gecko/20030418 Chimera/0.7+

Around line 420 of prlog.c, the code

    nb = PR_snprintf(line, sizeof(line)-1, "%ld[%p]: ",

is used to format characteresitcs of the thread that is being logged.

I think that there should be some element of customisation possible,
e.g. code like this:

//    static char *fmtThread = "%uld[%p]: ";
    static char *fmtThread = "[thread_id %x]: ";


Reproducible: Always

Steps to Reproduce:
1.  Turn on logging at some level
2.
3.

Actual Results:  
The logged lines of output will start with some really ugly numbers

Expected Results:  
It is not absolute, but I would have thought that a neater representation of
the thread id would be better.
-> nspr
Assignee: saari → wtc
Component: General → NSPR
Product: Camino → NSPR
QA Contact: winnie → wtc
Version: unspecified → 3.0
QA Contact: wtchang → nspr
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Severity: normal → S3

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

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