[logback-dev] [GIT] Logback: the generic, reliable, fast and flexible logging framework. branch, master, updated. v_0.9.25-44-g41c1e10
added by portage for gitosis-gentoo
git-noreply at pixie.qos.ch
Fri Dec 17 17:36:14 CET 2010
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 41c1e10c305e5a34005c3ccabbc2e35a46faf2e8 (commit)
from 888d97dcca98ab928da7d67bf6660c293cd47b9e (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=41c1e10c305e5a34005c3ccabbc2e35a46faf2e8
http://github.com/ceki/logback/commit/41c1e10c305e5a34005c3ccabbc2e35a46faf2e8
commit 41c1e10c305e5a34005c3ccabbc2e35a46faf2e8
Author: Ceki Gulcu <ceki at qos.ch>
Date: Fri Dec 17 17:36:10 2010 +0100
working version of compound keywords
diff --git a/logback-core/src/main/java/ch/qos/logback/core/pattern/parser/Parser.java b/logback-core/src/main/java/ch/qos/logback/core/pattern/parser/Parser.java
index 510aa7a..dff1bf8 100644
--- a/logback-core/src/main/java/ch/qos/logback/core/pattern/parser/Parser.java
+++ b/logback-core/src/main/java/ch/qos/logback/core/pattern/parser/Parser.java
@@ -118,14 +118,10 @@ public class Parser<E> extends ContextAwareBase {
}
}
+ // T = LITERAL | '%' C | '%' FORMAT_MODIFIER C
Node T() throws ScanException {
- // System.out.println("in T()");
Token t = getCurentToken();
- if (t == null) {
- throw new IllegalStateException("a LITERAL or '%'");
- }
-
- // System.out.println("Current token is " + t);
+ expectNotNull(t, "a LITERAL or '%'");
switch (t.getType()) {
case Token.LITERAL:
@@ -137,7 +133,7 @@ public class Parser<E> extends ContextAwareBase {
FormatInfo fi;
Token u = getCurentToken();
FormattingNode c;
- expectNotNull(u, "a FORMAT_MODIFIER, KEYWORD or LEFT_PARENTHESIS");
+ expectNotNull(u, "a FORMAT_MODIFIER, SIMPLE_KEYWORD or COMPOUND_KEYWORD");
if (u.getType() == Token.FORMAT_MODIFIER) {
fi = FormatInfo.valueOf((String) u.getValue());
advanceTokenPointer();
diff --git a/logback-core/src/test/java/ch/qos/logback/core/pattern/parser/OptionTokenizerTest.java b/logback-core/src/test/java/ch/qos/logback/core/pattern/parser/OptionTokenizerTest.java
index 6c8db70..bd23c5a 100644
--- a/logback-core/src/test/java/ch/qos/logback/core/pattern/parser/OptionTokenizerTest.java
+++ b/logback-core/src/test/java/ch/qos/logback/core/pattern/parser/OptionTokenizerTest.java
@@ -20,7 +20,7 @@ import java.util.List;
import org.junit.Test;
-public class OptionTokenizerTest {
+public class OptionTokenizerTest {
@Test
public void testEmpty() throws ScanException {
@@ -66,18 +66,20 @@ public class OptionTokenizerTest {
{
List ol = new OptionTokenizer("' x\\t'").tokenize();
List<String> witness = new ArrayList<String>();
- witness.add(" x\t");
+ witness.add(" x\\t");
assertEquals(witness, ol);
}
{
List ol = new OptionTokenizer("' x\\''").tokenize();
List<String> witness = new ArrayList<String>();
- witness.add(" x\'");
+ witness.add(" x\\'");
assertEquals(witness, ol);
}
}
+
+
@Test
public void testDoubleQuote() throws ScanException {
{
@@ -97,14 +99,14 @@ public class OptionTokenizerTest {
{
List ol = new OptionTokenizer("\" x\\t\"").tokenize();
List<String> witness = new ArrayList<String>();
- witness.add(" x\t");
+ witness.add(" x\\t");
assertEquals(witness, ol);
}
{
List ol = new OptionTokenizer("\" x\\\"\"").tokenize();
List<String> witness = new ArrayList<String>();
- witness.add(" x\"");
+ witness.add(" x\\\"");
assertEquals(witness, ol);
}
}
-----------------------------------------------------------------------
Summary of changes:
.../ch/qos/logback/core/pattern/parser/Parser.java | 10 +++-------
.../core/pattern/parser/OptionTokenizerTest.java | 12 +++++++-----
2 files changed, 10 insertions(+), 12 deletions(-)
hooks/post-receive
--
Logback: the generic, reliable, fast and flexible logging framework.
More information about the logback-dev
mailing list