HI. . . I had a lot of JUL logp code to convert to SLF4J so I tweaked the migrator in a few ways:
* Added MultiLineConversionRule to accommodate cases such as:
log.logp(Level.FINEST, MyClass.class.getName(),
"myMethod", "Log entry");
* Passed Reader into LineConverter in order to more easily control reading in of additional lines
* Changed ConversionRule.replace() to append the match.group(1) text to the replacement line if group(1) exists
* Added additional SingleConversionRules to accommodate additional logp scenarios
I converted quite a bit of code with minimal cleanup. Where that was necessary was pretty unavoidable:
* Code using Level, handlers, custom configuration, etc
* Log entries with commas get a bit mungled, e.g.:
log.logp(Level.FINEST, MyClass.class.getName(),
"myMethod", "This, e.g., would get mungled");
I did not do any regression testing but it worked in my case. Attaching the patch file in case I'm not the only slf4j fan converting logps!
Andy