[logback-dev] [qos-ch/logback-decoder] b27ba8: Beautify pom; Use updated libs from Maven Central
Tony Trinh
tony19 at gmail.com
Tue Sep 11 09:23:11 CEST 2012
Branch: refs/heads/master
Home: https://github.com/qos-ch/logback-decoder
Commit: b27ba8ea475fce9684cae287a712889c16b7ff47
https://github.com/qos-ch/logback-decoder/commit/b27ba8ea475fce9684cae287a712889c16b7ff47
Author: Tony Trinh <tony19 at gmail.com>
Date: 2012-09-10 (Mon, 10 Sep 2012)
Changed paths:
R lib/named-regexp-0.1.5.jar
M pom.xml
Log Message:
-----------
Beautify pom; Use updated libs from Maven Central
Commit: e85b712e852a888996facf9aae6d8097628ce4ae
https://github.com/qos-ch/logback-decoder/commit/e85b712e852a888996facf9aae6d8097628ce4ae
Author: Tony Trinh <tony19 at gmail.com>
Date: 2012-09-10 (Mon, 10 Sep 2012)
Changed paths:
A src/main/java/ch/qos/logback/core/pattern/parser2/Compiler.java
A src/main/java/ch/qos/logback/core/pattern/parser2/CompositeNode.java
A src/main/java/ch/qos/logback/core/pattern/parser2/FormattingNode.java
A src/main/java/ch/qos/logback/core/pattern/parser2/Node.java
A src/main/java/ch/qos/logback/core/pattern/parser2/OptionTokenizer.java
A src/main/java/ch/qos/logback/core/pattern/parser2/Parser.java
A src/main/java/ch/qos/logback/core/pattern/parser2/PatternInfo.java
A src/main/java/ch/qos/logback/core/pattern/parser2/PatternParser.java
A src/main/java/ch/qos/logback/core/pattern/parser2/SimpleKeywordNode.java
A src/main/java/ch/qos/logback/core/pattern/parser2/Token.java
A src/main/java/ch/qos/logback/core/pattern/parser2/TokenStream.java
A src/test/java/ch/qos/logback/core/pattern/parser2/PatternParserTest.java
Log Message:
-----------
Add pattern parser for layout patterns
This code is based on the parser from the ch.qos.logback.core.pattern.parser package (from original logback-core). Hence the similarly named package. The code is nearly identical except this version introduces a token position field to track the starting point of each token. This is useful for distinguishing regex characters inside literals from those inside keywords or option lists.
The decoder works by converting the log layout pattern into a regular expression (specifically, only the keywords and their modifiers are converted to regex) and then matching each line in a file against that regular expression. Since literals in the layout pattern can contain regex characters, we must escape them so that they're matched literally or else they could trip up the regex matcher.
For example, this layout pattern:
"[%level] - %replace(%msg){'foo','[bar]'}%n"
contains regex chars '[' and ']' around "%level". The brackets must be escaped or else they're interpreted as a regex character class. The %replace keyword has a few regex chars, but the keyword and all its modifiers are entirely converted into a regex pattern.
A regex conversion of the above layout pattern might look like this:
"\[(WARN|DEBUG|TRACE|ERROR|ALL)\] - (.*)\n"
Commit: c892306d42bb478124be1d9cb1a46473dea44c9a
https://github.com/qos-ch/logback-decoder/commit/c892306d42bb478124be1d9cb1a46473dea44c9a
Author: Tony Trinh <tony19 at gmail.com>
Date: 2012-09-10 (Mon, 10 Sep 2012)
Changed paths:
A codeStyle.xml
Log Message:
-----------
Add codeStyle.xml
Commit: ac0017337839f92ca5159d749d5665f5a15aa0f6
https://github.com/qos-ch/logback-decoder/commit/ac0017337839f92ca5159d749d5665f5a15aa0f6
Author: Tony Trinh <tony19 at gmail.com>
Date: 2012-09-10 (Mon, 10 Sep 2012)
Changed paths:
M src/main/java/ch/qos/logback/decoder/FieldCapturer.java
M src/main/java/ch/qos/logback/decoder/Main.java
M src/main/java/ch/qos/logback/decoder/MainArgs.java
Log Message:
-----------
Change FieldCapturer interface to take a PatternInfo object
The PatternInfo object contains auxiliary details that can be used to parse the field from a given string, including format modifiers, option lists, and children (for composite keywords).
Commit: db6547e7bd86bf05fce10bc230de3f682e5d2a7b
https://github.com/qos-ch/logback-decoder/commit/db6547e7bd86bf05fce10bc230de3f682e5d2a7b
Author: Tony Trinh <tony19 at gmail.com>
Date: 2012-09-10 (Mon, 10 Sep 2012)
Changed paths:
R src/main/java/ch/qos/logback/decoder/LayoutPatternInfo.java
R src/main/java/ch/qos/logback/decoder/LayoutPatternParser.java
Log Message:
-----------
Remove obsolete files
LayoutPatternInfo.java and LayoutPatternParser.java were moved to ch.qos.logback.core.pattern.parser2 and were renamed to remove the "Layout" prefix. I know I should've used `git mv`, but it wasn't worth the trouble to fix this particular mistake since there weren't many changes to these files. Sue me!
Commit: bffa4660614c824e387b9f87eb83eca6486fe906
https://github.com/qos-ch/logback-decoder/commit/bffa4660614c824e387b9f87eb83eca6486fe906
Author: Tony Trinh <tony19 at gmail.com>
Date: 2012-09-11 (Tue, 11 Sep 2012)
Changed paths:
M src/main/java/ch/qos/logback/decoder/Decoder.java
M src/main/java/ch/qos/logback/decoder/FileDecoder.java
M src/main/java/ch/qos/logback/decoder/UnknownLayoutPatternException.java
Log Message:
-----------
ongoing work on Decoder (5)
Commit: e61f6aca83a45e11de860351368d3ba99a03f935
https://github.com/qos-ch/logback-decoder/commit/e61f6aca83a45e11de860351368d3ba99a03f935
Author: Tony Trinh <tony19 at gmail.com>
Date: 2012-09-11 (Tue, 11 Sep 2012)
Changed paths:
M src/main/java/ch/qos/logback/decoder/PatternNames.java
Log Message:
-----------
Minor optimization
Make pattern list a static final variable instead of creating it on each function call to asList()
Commit: bcd756df5f83ab0c0a9c2ea660ffd30ea0d2c696
https://github.com/qos-ch/logback-decoder/commit/bcd756df5f83ab0c0a9c2ea660ffd30ea0d2c696
Author: Tony Trinh <tony19 at gmail.com>
Date: 2012-09-11 (Tue, 11 Sep 2012)
Changed paths:
M src/main/java/ch/qos/logback/decoder/regex/PatternLayoutRegexUtil.java
M src/test/java/ch/qos/logback/decoder/regex/PatternLayoutRegexUtilTest.java
Log Message:
-----------
Move escaper outside of PatternLayoutRegexUtil and update tests
Commit: 37876c6846b8636ced27c9ab9dd89f333f2f9dd4
https://github.com/qos-ch/logback-decoder/commit/37876c6846b8636ced27c9ab9dd89f333f2f9dd4
Author: Tony Trinh <tony19 at gmail.com>
Date: 2012-09-11 (Tue, 11 Sep 2012)
Changed paths:
M src/main/java/ch/qos/logback/decoder/DateParser.java
A src/main/java/ch/qos/logback/decoder/LevelParser.java
A src/main/java/ch/qos/logback/decoder/MessageParser.java
Log Message:
-----------
Add parsers for %date, %level, and %msg
Commit: 34b068d8c8dff81b4a8e1f04cff9115cf08ea776
https://github.com/qos-ch/logback-decoder/commit/34b068d8c8dff81b4a8e1f04cff9115cf08ea776
Author: Tony Trinh <tony19 at gmail.com>
Date: 2012-09-11 (Tue, 11 Sep 2012)
Changed paths:
M src/test/java/ch/qos/logback/decoder/DecoderTest.java
Log Message:
-----------
Add tests for decoding %date, %level, and %msg
Compare: https://github.com/qos-ch/logback-decoder/compare/f2dd92451a4b...34b068d8c8df
More information about the logback-dev
mailing list