Determining If a Message Will Be Logged
See also Minimizing the Impact of Logging Code.
Logger logger = Logger.getLogger("com.mycompany.MyClass");
// Check if the message will be logged
if (logger.isLoggable(Level.FINEST)) {
logger.finest("my finest message");
}
After the site was updated, code cut and paste doesn't work properly. Code formatting gets lost during the copy, resulting in a single line of code.