Bug 392371 - JavaUtilLog performing expensive format for unlogged items
* Adding isLoggable checks where format() is used
This commit is contained in:
parent
e30e307367
commit
b513244395
|
@ -57,7 +57,8 @@ public class JavaUtilLog extends AbstractLogger
|
|||
|
||||
public void warn(String msg, Object... args)
|
||||
{
|
||||
_logger.log(Level.WARNING, format(msg, args));
|
||||
if (_logger.isLoggable(Level.WARNING))
|
||||
_logger.log(Level.WARNING,format(msg,args));
|
||||
}
|
||||
|
||||
public void warn(Throwable thrown)
|
||||
|
@ -72,7 +73,8 @@ public class JavaUtilLog extends AbstractLogger
|
|||
|
||||
public void info(String msg, Object... args)
|
||||
{
|
||||
_logger.log(Level.INFO, format(msg, args));
|
||||
if (_logger.isLoggable(Level.INFO))
|
||||
_logger.log(Level.INFO, format(msg, args));
|
||||
}
|
||||
|
||||
public void info(Throwable thrown)
|
||||
|
@ -105,7 +107,8 @@ public class JavaUtilLog extends AbstractLogger
|
|||
|
||||
public void debug(String msg, Object... args)
|
||||
{
|
||||
_logger.log(Level.FINE, format(msg, args));
|
||||
if (_logger.isLoggable(Level.FINE))
|
||||
_logger.log(Level.FINE,format(msg, args));
|
||||
}
|
||||
|
||||
public void debug(Throwable thrown)
|
||||
|
|
Loading…
Reference in New Issue