Open Bug 1742046 Opened 4 years ago Updated 4 years ago

Investigate whether we can replace nsresult hexcodes with their names in networking logs

Categories

(Core :: Networking, task, P3)

task

Tracking

()

People

(Reporter: nhnt11, Unassigned)

Details

(Whiteboard: [necko-triaged])

Ideas so far:

  1. Go through and replace individual log messages

This would be too time consuming and easy to miss some here and there, and it's not future-proof. However, it is more conservative and would give us fine control over which messages we "upgrade".

  1. Hook the logging macro to auto-replace hexcodes before recording.

This would have a string-parsing perf cost at runtime since the values are dynamic. Feels tricky to get this right, but probably will be sustainable once we do. We could annotate hexcodes with the error name instead of replacing to preserve information - backwards compatibility with old workflows.

  1. Write a script or other external tool to parse log files and do the annotation/replacement as a post-processing step

This would be low-cost to implement, and add no perf overhead at runtime. We could ship the tool in the tree even. It would add a bit of overhead to process logs once we get them, and it's worth questioning whether this overhead doesn't completely invalidate the benefit of not having to look up one or two hexcodes. Maybe we could integrate into about:networking to auto-process logs captured from there.

Severity: -- → N/A
Priority: -- → P3
Whiteboard: [necko-triaged]
You need to log in before you can comment on or make changes to this bug.