Spring Batch: How to process multi-line log files
问题 I am trying to import the contents of a log file into a database using Spring Batch. I am currently using a FlatFileItemReader, but there are unfortunately many log entries that doesn't catch. The two main problems are: Lines that contain multi-line JSON Strings: 2012-03-22 11:47:35,307 DEBUG main someMethod(SomeClass.java:56): Do Something(18,true,null,null,null): my.json = '{ "Foo":"FooValue", "Bar":"BarValue", ... etc }' Lines that contain stack traces 2012-03-22 11:47:50,596 ERROR main