Mike Thon wrote:The other problem is that the docs recommend creating a separate logger for each class. Then I would need to ensure that the log level is set for each class. Seems like a lot of lines of code to write to set up logging and control the level of verbosity, so it seem like I'm doing it wrong.
The loggers are hierachical (based on a dot-separated convention) and inherit their levels from their parent if not set specifically. So you only need to set the level at the top of the tree.
For example, if you're naming the loggers after your classes, and all your classes are below
com.myapp, you can create a logger for "com.myapp" and set the level on that.