I have a basic introduction here https://garygregory.wordpress.com/2015/09/10/the-art-of-test-driven-development-understanding-logging/ but what eventually turns up (for me and at work) is that there are IMO some levels missing. For example, I'd like a level between INFO and DEBUG (like "more info" aka what some apps call VERBOSE). I would also use a level between DEBUG and TRACE where I use TRACE for API entry/exit type of logging. Ultimately, you can usually get away without using any extra levels and instead use another super feature: Markers (see the link).
Gary On Wed, Feb 1, 2017 at 10:29 PM, Matt Sicker <boa...@gmail.com> wrote: > I had a meeting at work recently where a small debate was brought up as to > what sorts of things to log at each logging level. I had my own opinion > about it, of course, but I noticed that there are brief notes in the > javadocs about each level (going back in the git logs, it look like Ralph > wrote those notes almost 6 years ago!) and that's about it when it comes to > any sort of specifics. > > Does anyone have some more elaborations on why you'd use each level? Or > some more concrete differences between, for example, error/warn and > debug/trace? Perhaps some examples reflecting how you've used it in the > past or even custom logging levels you've added? > > In a related idea, I'm kind of thinking that a general page about logging > concepts may be useful for the manual, so I'd like to gather some opinions > on said topics first. > > -- > Matt Sicker <boa...@gmail.com> > -- E-Mail: garydgreg...@gmail.com | ggreg...@apache.org Java Persistence with Hibernate, Second Edition <https://www.amazon.com/gp/product/1617290459/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1617290459> JUnit in Action, Second Edition <https://www.amazon.com/gp/product/1935182021/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de418%22> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182021> Spring Batch in Action <https://www.amazon.com/gp/product/1935182951/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%7Blink_id%7D%7D%22%3ESpring+Batch+in+Action> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182951> Blog: http://garygregory.wordpress.com Home: http://garygregory.com/ Tweet! http://twitter.com/GaryGregory