>On Sat, May 23, 2015 at 4:46 AM, Randell Jesup <rjesup.n...@jesup.org> wrote: >> This is used extensively in WebRTC and related media bits to enable >> *huge* amounts of debugs (like every-frame debugs for audio or video or >> per-network-packet debugs, which will swamp a system normally), and since >> people are used to enabling "debug" on random modules (or all:5), having >> verbose debugs in the "normal" :5 setting will cause pain. > >Can this be controlled some other way? Via a #define? Via another >environment variable?
Definitely *not* a #define. That makes it close-to-useless. >I ask because in discussions with Eric I've been encouraging him to >reduce the number of logging levels as much as possible. It would be >sad to have to complicate the general mechanism because one module >does things differently to the rest of the system. My point (as repeated here in other posts) is that you're reducing complexity (in number of log levels) by adding complexity elsewhere (and more total complexity, IMHO). I'd consider your suggestion above an example of "complicating the general mechanism", but doing it indirectly so it can *appear* to be simple (but isn't really). This isn't a single module using values above DEBUG - this is *all* over the media modules in different debug tags. Audio, MediaDecoder, MediaStreamGraph, MediaManager, WebM, etc. Also, the current patch misses a number of uses like MediaEngine: #define LOG(msg) PR_LOG(GetMediaManagerLog(), PR_LOG_DEBUG, msg) #define LOGFRAME(msg) PR_LOG(GetMediaManagerLog(), 6, msg) (yes, this uses 6, such that the common habit of blah:5 logging doesn't turn on the spam - you have to *want* it) I like fixing up logging! I just think shoehorning a level *under* DEBUG confuses things, while adding a level *above* DEBUG would let up standardize/regularize current practice (and avoid the (temporary) "which version am I using" problem.) /me stops arguing having said his piece -- 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