[logback-dev] [GIT] Logback: the generic, reliable, fast and flexible logging framework. branch master updated. v_1.0.0-53-gd7038b0
Gitbot
git-noreply at pixie.qos.ch
Fri Nov 11 11:45:34 CET 2011
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Logback: the generic, reliable, fast and flexible logging framework.".
The branch, master has been updated
via d7038b0e289b38382f45c2fe6f599d89980454db (commit)
from 9c58b9e8202939b9a5888fb3896a88f82e04966b (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.qos.ch/gitweb/?p=logback.git;a=commit;h=d7038b0e289b38382f45c2fe6f599d89980454db
http://github.com/ceki/logback/commit/d7038b0e289b38382f45c2fe6f599d89980454db
commit d7038b0e289b38382f45c2fe6f599d89980454db
Author: Ceki Gulcu <ceki at qos.ch>
Date: Fri Nov 11 11:13:05 2011 +0100
upgrade to janino 2.5.16, fix LBCORE-210, remove test-time dependency on joda time
diff --git a/logback-access/pom.xml b/logback-access/pom.xml
index fdd3d5a..830ac97 100644
--- a/logback-access/pom.xml
+++ b/logback-access/pom.xml
@@ -76,7 +76,7 @@
<!--</dependency>-->
<dependency>
- <groupId>janino</groupId>
+ <groupId>org.codehaus.janino</groupId>
<artifactId>janino</artifactId>
<scope>compile</scope>
<optional>true</optional>
diff --git a/logback-classic/pom.xml b/logback-classic/pom.xml
index 0d67770..caf59d1 100644
--- a/logback-classic/pom.xml
+++ b/logback-classic/pom.xml
@@ -106,7 +106,7 @@
</dependency>
<dependency>
- <groupId>janino</groupId>
+ <groupId>org.codehaus.janino</groupId>
<artifactId>janino</artifactId>
<scope>compile</scope>
<optional>true</optional>
@@ -169,13 +169,6 @@
</dependency>
<dependency>
- <groupId>joda-time</groupId>
- <artifactId>joda-time</artifactId>
- <version>1.6</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.main</artifactId>
<version>2.0.2</version>
diff --git a/logback-classic/src/test/java/ch/qos/logback/classic/issue/lbclassic36/DateFormatOriginal_tzest.java b/logback-classic/src/test/java/ch/qos/logback/classic/issue/lbclassic36/DateFormatOriginal_tzest.java
index 597cfd8..e35e54e 100644
--- a/logback-classic/src/test/java/ch/qos/logback/classic/issue/lbclassic36/DateFormatOriginal_tzest.java
+++ b/logback-classic/src/test/java/ch/qos/logback/classic/issue/lbclassic36/DateFormatOriginal_tzest.java
@@ -20,9 +20,9 @@ import junit.framework.TestSuite;
import java.text.SimpleDateFormat;
import java.util.Date;
-import org.joda.time.format.DateTimeFormatter;
-import org.joda.time.format.DateTimeFormat;
-import org.joda.time.DateTime;
+//import org.joda.time.format.DateTimeFormatter;
+//import org.joda.time.format.DateTimeFormat;
+//import org.joda.time.DateTime;
public class DateFormatOriginal_tzest extends TestCase {
public static final String ISO8601_PATTERN = "yyyy-MM-dd HH:mm:ss,SSS";
@@ -57,30 +57,30 @@ public class DateFormatOriginal_tzest extends TestCase {
super.tearDown();
}
- public void testRaw() throws Exception {
- SimpleDateFormat simpleFormat = new SimpleDateFormat(ISO8601_PATTERN);
- DateTimeFormatter jodaFormat = DateTimeFormat.forPattern(ISO8601_PATTERN);
-
- Date date = new Date();
- DateTime dateTime = new DateTime(date);
-
- long start = System.nanoTime();
- for (int i = 0; i < 100000; ++i) {
- jodaFormat.print(dateTime);
- }
- long jodaAvg = (System.nanoTime() - start) / 100000;
-
-
- start = System.nanoTime();
- for (int i = 0; i < 100000; ++i) {
- simpleFormat.format(date);
- }
- long simpleAvg = (System.nanoTime() - start) / 100000;
-
- float diff = (((float) (simpleAvg - jodaAvg)) / simpleAvg) * 100;
- System.out.println("Raw - JDK: " + simpleAvg + " ns Joda: " + jodaAvg
- + " ns - Difference: " + diff + "%");
- }
+// public void testRaw() throws Exception {
+// SimpleDateFormat simpleFormat = new SimpleDateFormat(ISO8601_PATTERN);
+// DateTimeFormatter jodaFormat = DateTimeFormat.forPattern(ISO8601_PATTERN);
+//
+// Date date = new Date();
+// DateTime dateTime = new DateTime(date);
+//
+// long start = System.nanoTime();
+// for (int i = 0; i < 100000; ++i) {
+// jodaFormat.print(dateTime);
+// }
+// long jodaAvg = (System.nanoTime() - start) / 100000;
+//
+//
+// start = System.nanoTime();
+// for (int i = 0; i < 100000; ++i) {
+// simpleFormat.format(date);
+// }
+// long simpleAvg = (System.nanoTime() - start) / 100000;
+//
+// float diff = (((float) (simpleAvg - jodaAvg)) / simpleAvg) * 100;
+// System.out.println("Raw - JDK: " + simpleAvg + " ns Joda: " + jodaAvg
+// + " ns - Difference: " + diff + "%");
+// }
public void testSynchronized() throws Exception {
SynchronizedDateFormatter formatter = new SynchronizedDateFormatter();
@@ -151,30 +151,30 @@ public class DateFormatOriginal_tzest extends TestCase {
}
- public void testDateTimeFormatter() throws Exception {
- int threads = 10;
- int iterations = 10000;
- Thread[] formatThreads = new DateTimeFormatThread[threads];
- JodaFormatter formatter = new JodaFormatter();
- Date date = new Date();
- DateTime dateTime = new DateTime(date);
-
- for (int i = 0; i < threads; i++) {
- formatThreads[i] = new DateTimeFormatThread(formatter, dateTime,
- iterations);
- }
- long start = System.nanoTime();
- for (Thread thread : formatThreads) {
- thread.start();
- }
- for (Thread thread : formatThreads) {
- thread.join();
- }
- long end = System.nanoTime();
- double actual = ((double) (end - start)) / NANOS_IN_ONE_SEC;
- System.out.printf("Joda DateTimeFormatter: %,.4f seconds\n", actual);
-
- }
+// public void testDateTimeFormatter() throws Exception {
+// int threads = 10;
+// int iterations = 10000;
+// Thread[] formatThreads = new DateTimeFormatThread[threads];
+// JodaFormatter formatter = new JodaFormatter();
+// Date date = new Date();
+// DateTime dateTime = new DateTime(date);
+//
+// for (int i = 0; i < threads; i++) {
+// formatThreads[i] = new DateTimeFormatThread(formatter, dateTime,
+// iterations);
+// }
+// long start = System.nanoTime();
+// for (Thread thread : formatThreads) {
+// thread.start();
+// }
+// for (Thread thread : formatThreads) {
+// thread.join();
+// }
+// long end = System.nanoTime();
+// double actual = ((double) (end - start)) / NANOS_IN_ONE_SEC;
+// System.out.printf("Joda DateTimeFormatter: %,.4f seconds\n", actual);
+//
+// }
public interface Formatter {
String format(Date date);
@@ -206,13 +206,13 @@ public class DateFormatOriginal_tzest extends TestCase {
}
}
- public static class JodaFormatter {
- DateTimeFormatter formatter = DateTimeFormat.forPattern(ISO8601_PATTERN);
-
- public String format(DateTime date) {
- return formatter.print(date);
- }
- }
+// public static class JodaFormatter {
+// DateTimeFormatter formatter = DateTimeFormat.forPattern(ISO8601_PATTERN);
+//
+// public String format(DateTime date) {
+// return formatter.print(date);
+// }
+// }
public static class DateFormatThread extends Thread {
Formatter formatter;
@@ -232,21 +232,21 @@ public class DateFormatOriginal_tzest extends TestCase {
}
}
- public static class DateTimeFormatThread extends Thread {
- JodaFormatter formatter;
- DateTime date;
- long iterCount;
-
- public DateTimeFormatThread(JodaFormatter f, DateTime date, long iterations) {
- this.formatter = f;
- this.date = date;
- this.iterCount = iterations;
- }
-
- public void run() {
- for (int i = 0; i < iterCount; i++) {
- formatter.format(this.date);
- }
- }
- }
+// public static class DateTimeFormatThread extends Thread {
+// JodaFormatter formatter;
+// DateTime date;
+// long iterCount;
+//
+// public DateTimeFormatThread(JodaFormatter f, DateTime date, long iterations) {
+// this.formatter = f;
+// this.date = date;
+// this.iterCount = iterations;
+// }
+//
+// public void run() {
+// for (int i = 0; i < iterCount; i++) {
+// formatter.format(this.date);
+// }
+// }
+// }
}
diff --git a/logback-classic/src/test/java/ch/qos/logback/classic/issue/lbclassic36/DateFormatPerf_Tapp.java b/logback-classic/src/test/java/ch/qos/logback/classic/issue/lbclassic36/DateFormatPerf_Tapp.java
index d08cf93..2cd7fd2 100644
--- a/logback-classic/src/test/java/ch/qos/logback/classic/issue/lbclassic36/DateFormatPerf_Tapp.java
+++ b/logback-classic/src/test/java/ch/qos/logback/classic/issue/lbclassic36/DateFormatPerf_Tapp.java
@@ -16,8 +16,8 @@ package ch.qos.logback.classic.issue.lbclassic36;
import java.text.SimpleDateFormat;
import java.util.Date;
-import org.joda.time.format.DateTimeFormat;
-import org.joda.time.format.DateTimeFormatter;
+//import org.joda.time.format.DateTimeFormat;
+//import org.joda.time.format.DateTimeFormatter;
public class DateFormatPerf_Tapp {
public static final String ISO8601_PATTERN = "yyyy-MM-dd HH:mm:ss,SSS";
@@ -40,11 +40,11 @@ public class DateFormatPerf_Tapp {
}
static double doRawJoda() {
- DateTimeFormatter jodaFormat = DateTimeFormat.forPattern(ISO8601_PATTERN);
+// DateTimeFormatter jodaFormat = DateTimeFormat.forPattern(ISO8601_PATTERN);
long timeInMillis = new Date().getTime();
long start = System.nanoTime();
for (int i = 0; i < RUN_LENGTH; ++i) {
- jodaFormat.print(timeInMillis);
+// jodaFormat.print(timeInMillis);
}
return (System.nanoTime() - start) * 1.0d / RUN_LENGTH;
}
diff --git a/logback-classic/src/test/java/ch/qos/logback/classic/issue/lbclassic36/SelectiveDateFormattingRunnable.java b/logback-classic/src/test/java/ch/qos/logback/classic/issue/lbclassic36/SelectiveDateFormattingRunnable.java
index d358c39..37ea229 100644
--- a/logback-classic/src/test/java/ch/qos/logback/classic/issue/lbclassic36/SelectiveDateFormattingRunnable.java
+++ b/logback-classic/src/test/java/ch/qos/logback/classic/issue/lbclassic36/SelectiveDateFormattingRunnable.java
@@ -14,8 +14,8 @@
package ch.qos.logback.classic.issue.lbclassic36;
import java.text.SimpleDateFormat;
-import org.joda.time.format.DateTimeFormat;
-import org.joda.time.format.DateTimeFormatter;
+//import org.joda.time.format.DateTimeFormat;
+//import org.joda.time.format.DateTimeFormatter;
import ch.qos.logback.core.contention.RunnableWithCounterAndDone;
@@ -38,8 +38,8 @@ public class SelectiveDateFormattingRunnable extends
static long CACHE = 0;
static SimpleDateFormat SDF = new SimpleDateFormat(ISO8601_PATTERN);
- static final DateTimeFormatter JODA = DateTimeFormat
- .forPattern(ISO8601_PATTERN);
+// static final DateTimeFormatter JODA = DateTimeFormat
+// .forPattern(ISO8601_PATTERN);
SelectiveDateFormattingRunnable(FormattingModel model) {
this.model = model;
@@ -77,7 +77,7 @@ public class SelectiveDateFormattingRunnable extends
for (;;) {
long now = System.currentTimeMillis();
if (isCacheStale(now)) {
- JODA.print(now);
+ //JODA.print(now);
}
counter++;
if (done) {
@@ -87,12 +87,12 @@ public class SelectiveDateFormattingRunnable extends
}
private static boolean isCacheStale(long now) {
- synchronized (JODA) {
- if (CACHE != now) {
- CACHE = now;
- return true;
- }
- }
+// synchronized (JODA) {
+// if (CACHE != now) {
+// CACHE = now;
+// return true;
+// }
+// }
return false;
}
diff --git a/logback-core/pom.xml b/logback-core/pom.xml
index 4efc958..fd2c90a 100644
--- a/logback-core/pom.xml
+++ b/logback-core/pom.xml
@@ -38,7 +38,7 @@
<dependencies>
<dependency>
- <groupId>janino</groupId>
+ <groupId>org.codehaus.janino</groupId>
<artifactId>janino</artifactId>
<scope>compile</scope>
<optional>true</optional>
diff --git a/logback-core/src/main/java/ch/qos/logback/core/util/EnvUtil.java b/logback-core/src/main/java/ch/qos/logback/core/util/EnvUtil.java
index ec708aa..08e0e5e 100644
--- a/logback-core/src/main/java/ch/qos/logback/core/util/EnvUtil.java
+++ b/logback-core/src/main/java/ch/qos/logback/core/util/EnvUtil.java
@@ -33,7 +33,7 @@ public class EnvUtil {
static public boolean isJaninoAvailable() {
ClassLoader classLoader = EnvUtil.class.getClassLoader();
try {
- Class bindingClass = classLoader.loadClass("org.codehaus.janino.Cookable");
+ Class bindingClass = classLoader.loadClass("org.codehaus.janino.ScriptEvaluator");
return (bindingClass != null);
} catch (ClassNotFoundException e) {
return false;
diff --git a/pom.xml b/pom.xml
index 6f88e10..7e6ced3 100755
--- a/pom.xml
+++ b/pom.xml
@@ -33,7 +33,7 @@
logback-classic/pom.xml and in setClasspath.cmd -->
<slf4j.version>1.6.4</slf4j.version>
<junit.version>4.10</junit.version>
- <janino.version>2.5.10</janino.version>
+ <janino.version>2.5.16</janino.version>
<scala.version>2.9.1</scala.version>
<groovy.version>1.7.6</groovy.version>
<consolePlugin.version>1.1.0</consolePlugin.version>
@@ -91,7 +91,7 @@
<version>${slf4j.version}</version>
</dependency>
<dependency>
- <groupId>janino</groupId>
+ <groupId>org.codehaus.janino</groupId>
<artifactId>janino</artifactId>
<version>${janino.version}</version>
</dependency>
-----------------------------------------------------------------------
Summary of changes:
logback-access/pom.xml | 2 +-
logback-classic/pom.xml | 9 +-
.../lbclassic36/DateFormatOriginal_tzest.java | 150 ++++++++++----------
.../issue/lbclassic36/DateFormatPerf_Tapp.java | 8 +-
.../SelectiveDateFormattingRunnable.java | 22 ++--
logback-core/pom.xml | 2 +-
.../java/ch/qos/logback/core/util/EnvUtil.java | 2 +-
pom.xml | 4 +-
8 files changed, 96 insertions(+), 103 deletions(-)
hooks/post-receive
--
Logback: the generic, reliable, fast and flexible logging framework.
More information about the logback-dev
mailing list