>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. The feeling I got >from most code that did 'DEBUG + 1' was that they needed to use DEBUG for >the informational stuff (because there was no Info level) and wanted a >lower level for the more spammy stuff (DEBUG was occupied, so fine DEBUG + >1). > >This was exemplified with the many variations of: > #define LOGI(...) PR_LOG(..., PR_LOG_DEBUG) > #define LOGV(...) PR_LOG(..., PR_LOG_DEBUG + 1) > >Note: For LOGI, to me at least, 'I' => Info >Flipside of course the 'V' => Verbose, but I think this a semantic >issue. Debug and Verbose are essentially the same thing now that we have >Info.
Only if you avoid the "which module debug pattern am I in" question by switching *all* non-verbose uses of PR_LOG_DEBUG to PR_LOG_INFO (basically remap DEBUG to INFO, so that verbose logging can own the "DEBUG" level... but this seems way overkill (and liable to cause horrible ongoing confusion) compared to allowing a "PR_LOG_VERBOSE" level. PR_LOG_VERBOSE is clear and understandable. Modules where normal debugs are on INFO and you-likely-don't-want-it is on DEBUG will cause ongoing mental anguish and mismatch, and confusion for new contributors. >We can see this ambiguity in various logging frameworks, generally there's >a debug, but if there's not there's a verbose/trace, and usually not both. Though Android has both. -- Randell Jesup, Mozilla Corp remove "news" for personal email _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform