You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by rg...@apache.org on 2017/03/19 20:26:19 UTC
logging-log4j2 git commit: LOG4J2-1359 - Remove print statement
Repository: logging-log4j2
Updated Branches:
refs/heads/LOG4J2-1359 8eac91024 -> 311101cb4
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/LOG4J2-1359
Commit: 311101cb47594a4bc781a5365a471d5be7f40647
Parents: 8eac910
Author: Ralph Goers <rg...@nextiva.com>
Authored: Sun Mar 19 13:25:57 2017 -0700
Committer: Ralph Goers <rg...@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 createSerializableLogEventProxyWithoutExceptionWithLocation() {
+ public Serializable createSerializableLogEventProxyWithoutExceptionWithLocation(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 {