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,6 +57,7 @@ public class JavaUtilLog extends AbstractLogger
|
|||
|
||||
public void warn(String msg, Object... args)
|
||||
{
|
||||
if (_logger.isLoggable(Level.WARNING))
|
||||
_logger.log(Level.WARNING,format(msg,args));
|
||||
}
|
||||
|
||||
|
@ -72,6 +73,7 @@ public class JavaUtilLog extends AbstractLogger
|
|||
|
||||
public void info(String msg, Object... args)
|
||||
{
|
||||
if (_logger.isLoggable(Level.INFO))
|
||||
_logger.log(Level.INFO, format(msg, args));
|
||||
}
|
||||
|
||||
|
@ -105,6 +107,7 @@ public class JavaUtilLog extends AbstractLogger
|
|||
|
||||
public void debug(String msg, Object... args)
|
||||
{
|
||||
if (_logger.isLoggable(Level.FINE))
|
||||
_logger.log(Level.FINE,format(msg, args));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue