[EMAIL PROTECTED] wrote: >I'm working on a project where I'm implementing a 3rd party >proprietary/(mostly undocumented) network protocol. >One of my logging statements dumps each byte as it's received/sent over the >network. This is used in the "direst" debugging situations, and can >obviously generate a very large number of logging events. >(90% or more of the data is just encoded character data, and I also debug >each character as it's decoded, so I get alot of events here as well.) > >These statements have the level of "DEBUG", but I think these situations >warrant a new Level. Say "DEBUG_PEDANTIC". Basically this Level could be >used in situations where the statement is a debug statement by definition, >but it's called such a HUGE amount of times, and carries so little >information, that it's only used in special/rare circumstances. > >Does this make any sense to add to log4j permanently? Does anyone else have >a use for it? >Or should I just add it myself to my own copy and use it privately? > > > I would like to add my "vote" (desire) for a second, more detailed DEBUG level (TRACE, DEBUG_DETAIL, GORY, whatever)
I have been using a home-grown "multiplexed" logging system for quite a while (originally writting in C++) which has log message "type" or "channel" which more-or-less correlate with the log4j Levels and which then have the ability to assign a "level" or "priority" to a message being sent to any given "channel". The upshot of this is the ability to dynamically change the "level" of debug messages being viewed. This system is probably too complicated but I have found the log4j design which combines the concept of message "type" and "level" into one Level too far the other way. I have found it very, very helpful to embed two or three "level" of debug messages. When the level one debug type messages indicate a problem, I can run it again but turn on the debug type messages at a higher level and get a more detailed view to pinpoint the problem. Note, if/when I turn these higher level messages on right away I wind up getting way to much detail during the "normal" testing runs. In the absense of TRACE (GORY, whatever), I find myself having to go back in and add more and more detailed DEBUG messages until I find the problem and then commenting them out. Even in this case all the rest of log4j makes it a lot better than adding System.out statements BUT it still seems an unneeded restriction. R.Parr Temporal Arts -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>