My team has been trying (and failing!) for years to get a Verbose level added to NSPR logging.

In the (non-WebRTC) media playback code, we now use the PR_LOG_DEBUG+1 hack. Like WebRTC, we have spammy, and super spammy logging modes. Because of threading, often logging is the only or easiest way to debug things.

We've previously used an environment variable to toggle on verbose logging, and previously also tried using separate log modules for logging, and in the end we went with the PR_LOG_DEBUG+1 hack to get what we want.

We really don't want a custom way to turn on verbose logging, our logging system should support what we want.


On 5/23/2015 9:53 AM, Eric Rahm wrote:
Thanks Adam, these are good points.

On Friday, May 22, 2015 at 2:08:33 PM UTC-7, Adam Roach wrote:
On 5/22/15 15:51, Eric Rahm wrote:
I agree, we shouldn't make it harder to turn on logging. The easy solution is 
just to add a separate logger for verbose messages (if we choose not to add 
Verbose/Trace).
I don't know why we wouldn't just add a more verbose log level (Verbose,
Trace... I don't care what we call it). The presence of "DEBUG + 1" in
our code is evidence of a clear, actual need.
This was my thought as well initially (my first proposal had a Verbose level). 
After auditing the code I changed my mind.

I believe adding the Info level will serve this need.

I feel that using "Info" to denote "debug" messages and "Debug" to denote "verbose" messages is semantically *not* what we want.

If you're convinced that we can get by with 5 log levels, why not delete the "Info" category and add a "Verbose" mode as greater than "Debug" ? Then my team will get semantically what we want; we don't use "Info" as it's not semantically what we want.


Cheers,
Chris Pearce.

_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to