diff options
author | Jonathan Gossage <jgossage@gmail.com> | 2010-07-17 01:53:23 +0200 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2010-07-17 01:53:23 +0200 |
commit | ec13e0382ab1f9d32d889068b7aeb9c2ef6a2b60 (patch) | |
tree | 60ddade7cbc9d93347f40c9ddb8638fedb9537cf | |
parent | 6e155d5f415e7f62f3f25e082dbee558e5be0b2d (diff) | |
download | jgit-ec13e0382ab1f9d32d889068b7aeb9c2ef6a2b60.tar.gz jgit-ec13e0382ab1f9d32d889068b7aeb9c2ef6a2b60.zip |
Fully implement Logger interface
On April 27, 2010 the Logger interface was upgraded with a number of new methods
to make it consistent with the implementations it was meant to support.
This patch makes RecordingLogger consistent with the Logger interface and allows to
also use Jetty 7.1.5 released with Helios which can be installed from the p2 repository
at http://download.eclipse.org/jetty/7.1.5.v20100705/repository
Change-Id: I5645436bbe7492f82d4069e4d9cbebede0bf764e
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
-rw-r--r-- | org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/util/RecordingLogger.java | 48 |
1 files changed, 44 insertions, 4 deletions
diff --git a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/util/RecordingLogger.java b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/util/RecordingLogger.java index 24e125c22b..dafc3c5f6c 100644 --- a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/util/RecordingLogger.java +++ b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/util/RecordingLogger.java @@ -78,6 +78,10 @@ public class RecordingLogger implements Logger { public Warning(String msg, Throwable cause) { super(msg, cause); } + + public Warning(Throwable thrown) { + super(thrown); + } } private final String name; @@ -116,7 +120,9 @@ public class RecordingLogger implements Logger { } } - public void debug(String msg, Object arg0, Object arg1) { + public void debug(@SuppressWarnings("unused") String msg, + @SuppressWarnings("unused") Object arg0, + @SuppressWarnings("unused") Object arg1) { // Ignore (not relevant to test failures) } @@ -124,15 +130,17 @@ public class RecordingLogger implements Logger { // Ignore (not relevant to test failures) } - public void debug(String msg) { + public void debug(@SuppressWarnings("unused") String msg) { // Ignore (not relevant to test failures) } - public void info(String msg, Object arg0, Object arg1) { + public void info(@SuppressWarnings("unused") String msg, + @SuppressWarnings("unused") Object arg0, + @SuppressWarnings("unused") Object arg1) { // Ignore (not relevant to test failures) } - public void info(String msg) { + public void info(@SuppressWarnings("unused") String msg) { // Ignore (not relevant to test failures) } @@ -143,4 +151,36 @@ public class RecordingLogger implements Logger { public void setDebugEnabled(boolean enabled) { // Ignore (not relevant to test failures) } + + public void warn(String msg, Object... args) { + synchronized (warnings) { + warnings.add(new Warning(MessageFormat.format(msg, args))); + } + } + + public void warn(Throwable thrown) { + synchronized (warnings) { + warnings.add(new Warning(thrown)); + } + } + + public void info(String msg, Object... args) { + // Ignore (not relevant to test failures) + } + + public void info(Throwable thrown) { + // Ignore (not relevant to test failures) + } + + public void info(String msg, Throwable thrown) { + // Ignore (not relevant to test failures) + } + + public void debug(String msg, Object... args) { + // Ignore (not relevant to test failures) + } + + public void debug(Throwable thrown) { + // Ignore (not relevant to test failures) + } } |