meydrew / otroslogviewer

Automatically exported from code.google.com/p/otroslogviewer
0 stars 0 forks source link

Feature request #286

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Please add the possibility to mark certain pattern properties as optional.

Something along the lines of: pattern=[TIMESTAMP] [LEVELTHREAD]{LINE}? CLASS 
MESSAGE

Where LINE could be optional.

Original issue reported on code.google.com by alexande...@gmail.com on 29 Nov 2013 at 1:09

GoogleCodeExporter commented 9 years ago
I went to implement a LogImporter plugin to do this (basically to use the full 
power of Java regular expressions to use regex group parentheses to specify 
where your fields are in the log files), but it turns out that the touted 
pluggability isn't usable.  LogImportersLoader is hardcoded to use just 
Log4jPatternMultilineLogParser.  The importer plugin property files are ignored 
unless they have type of "log4j", and that "log4j" string is hard-coded into 
static (non-pluggable) Java code (method 
LogImportersLoader.loadPropertyPatternFileFromDir).

Original comment by blaine.s...@admc.com on 1 Dec 2013 at 4:54

GoogleCodeExporter commented 9 years ago

Original comment by blaine.s...@admc.com on 10 Dec 2013 at 1:42

GoogleCodeExporter commented 9 years ago
Was this feature added or just the ticket got closed? If it was, what is the 
exact format chosen for specifying optional pattern properties?

Thanks.

Original comment by alexande...@gmail.com on 10 Dec 2013 at 4:41

GoogleCodeExporter commented 9 years ago
I have committed the changes to the code trunk, but as the status reflects, it 
has not been "Accepted" yet.

There isn't end-user documentation for it yet, but I have written the details 
to you personally in a comment on page 
https://code.google.com/p/otroslogviewer/wiki/Log4jPatternLayout .

That comment also explains where you can download a binary build that has the 
feature working.

Original comment by blaine.s...@admc.com on 10 Dec 2013 at 4:48

GoogleCodeExporter commented 9 years ago
Many thanks!

Original comment by alexande...@gmail.com on 10 Dec 2013 at 4:51

GoogleCodeExporter commented 9 years ago

Original comment by otros.sy...@gmail.com on 10 Mar 2014 at 3:34

GoogleCodeExporter commented 9 years ago

Original comment by otros.sy...@gmail.com on 10 Mar 2014 at 3:38