In the future, you could always use LowLevelLogUtil for debugging. ;) On 21 April 2017 at 01:40, <rgo...@apache.org> wrote:
> LOG4J2-1359 - Remove print statement > > > Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo > Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/ > commit/311101cb > Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/311101cb > Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/311101cb > > Branch: refs/heads/master > Commit: 311101cb47594a4bc781a5365a471d5be7f40647 > Parents: 8eac910 > Author: Ralph Goers <rgo...@nextiva.com> > Authored: Sun Mar 19 13:25:57 2017 -0700 > Committer: Ralph Goers <rgo...@nextiva.com> > Committed: Sun Mar 19 13:25:57 2017 -0700 > > ---------------------------------------------------------------------- > .../apache/logging/log4j/util/ReflectionUtil.java | 1 - > .../logging/log4j/core/impl/LocationLocator.java | 5 ----- > .../log4j/perf/jmh/Log4jLogEventBenchmark.java | 16 +++++++++++----- > 3 files changed, 11 insertions(+), 11 deletions(-) > ---------------------------------------------------------------------- > > > http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/ > 311101cb/log4j-api/src/main/java/org/apache/logging/log4j/ > util/ReflectionUtil.java > ---------------------------------------------------------------------- > diff --git > a/log4j-api/src/main/java/org/apache/logging/log4j/util/ReflectionUtil.java > b/log4j-api/src/main/java/org/apache/logging/log4j/util/ > ReflectionUtil.java > index 74be0b2..52f171e 100644 > --- a/log4j-api/src/main/java/org/apache/logging/log4j/util/ > ReflectionUtil.java > +++ b/log4j-api/src/main/java/org/apache/logging/log4j/util/ > ReflectionUtil.java > @@ -61,7 +61,6 @@ public final class ReflectionUtil { > static { > Method getCallerClass; > int java7u25CompensationOffset = 0; > - System.out.println("Using Java 7 ReflectionUtil"); > try { > final Class<?> sunReflectionClass = LoaderUtil.loadClass("sun. > reflect.Reflection"); > getCallerClass = > sunReflectionClass.getDeclaredMethod("getCallerClass", > int.class); > > http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/ > 311101cb/log4j-core/src/main/java/org/apache/logging/log4j/ > core/impl/LocationLocator.java > ---------------------------------------------------------------------- > diff --git > a/log4j-core/src/main/java/org/apache/logging/log4j/core/impl/LocationLocator.java > b/log4j-core/src/main/java/org/apache/logging/log4j/core/ > impl/LocationLocator.java > index a47ea5b..e0ff95d 100644 > --- a/log4j-core/src/main/java/org/apache/logging/log4j/core/ > impl/LocationLocator.java > +++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/ > impl/LocationLocator.java > @@ -21,11 +21,6 @@ package org.apache.logging.log4j.core.impl; > */ > public class LocationLocator { > > - static { > - System.out.println("Using Java 7 Locator"); > - } > - > - > public static StackTraceElement calcLocation(final String > fqcnOfLogger) { > if (fqcnOfLogger == null) { > return null; > > http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/ > 311101cb/log4j-perf/src/main/java/org/apache/logging/log4j/perf/jmh/ > Log4jLogEventBenchmark.java > ---------------------------------------------------------------------- > diff --git a/log4j-perf/src/main/java/org/apache/logging/log4j/perf/ > jmh/Log4jLogEventBenchmark.java b/log4j-perf/src/main/java/ > org/apache/logging/log4j/perf/jmh/Log4jLogEventBenchmark.java > index 4e3a303..a141bec 100644 > --- a/log4j-perf/src/main/java/org/apache/logging/log4j/perf/ > jmh/Log4jLogEventBenchmark.java > +++ b/log4j-perf/src/main/java/org/apache/logging/log4j/perf/ > jmh/Log4jLogEventBenchmark.java > @@ -70,21 +70,27 @@ public class Log4jLogEventBenchmark { > } > > @Benchmark > - public Serializable createSerializableLogEventProxyWithoutException() > { > + public Serializable createSerializableLogEventProxyWithoutException(final > Blackhole bh) { > final Log4jLogEvent event = new Log4jLogEvent("a.b.c", null, > "a.b.c", Level.INFO, MESSAGE, null, null); > - return Log4jLogEvent.serialize(event, false); > + Serializable obj = Log4jLogEvent.serialize(event, false); > + bh.consume(obj); > + return obj; > } > > @Benchmark > - public Serializable createSerializableLogEventProx > yWithoutExceptionWithLocation() { > + public Serializable createSerializableLogEventProx > yWithoutExceptionWithLocation(final Blackhole bh) { > final Log4jLogEvent event = new Log4jLogEvent("a.b.c", null, > "a.b.c", Level.INFO, MESSAGE, null, null); > - return Log4jLogEvent.serialize(event, true); > + Serializable obj = Log4jLogEvent.serialize(event, true); > + bh.consume(obj); > + return obj; > } > > @Benchmark > public Serializable createSerializableLogEventProxyWithException(final > Blackhole bh) { > final Log4jLogEvent event = new Log4jLogEvent("a.b.c", null, > "a.b.c", Level.INFO, MESSAGE, null, ERROR); > - return Log4jLogEvent.serialize(event, false); > + Serializable obj = Log4jLogEvent.serialize(event, false); > + bh.consume(obj); > + return obj; > } > > private static class TestClass { > > -- Matt Sicker <boa...@gmail.com>