reduce log generation when level is none

This commit is contained in:
Zhao Yang 2015-12-16 13:57:22 +08:00
parent 6b622a4096
commit cfce92f127
1 changed files with 3 additions and 0 deletions

View File

@ -174,6 +174,9 @@ public class Log {
public final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(Logger.class.getPackage().getName());
public void log (int level, String category, String message, Throwable ex) {
if (level == LEVEL_NONE) {
return;
}
StringBuilder builder = new StringBuilder(256);
if (category != null) {
builder.append(category);