Wednesday, 15 May 2013

java - Set logging level at handler or logger? -


I am using Java logger for the first time and have seen that it is possible to set logging level through Handler.Setalval (...) or logger.Setalval (...) Although I can not find any difference, is there any difference? And if there is, then what is the recommended way to do this?

logger a specific class. However, you may have multiple handlers that are connected to that logger if you set the 'handler level' instead of the logar level, then you need to make sure that you are setting the right handler until you have many If you are not using handlers and need a good level of granulity in your logging, then it would be best if you adjust the logger level and leave the handlers alone.

Check out how good a handler and logger work together.


No comments:

Post a Comment