Fixed an endless loop in the log4j importer.
The log4j importer now logs a warning if it skips an invalid line.
Refactoring: Extracted a log_level_from_log4j_tag() function.
Refactoring: Tweaked the tests.
Refactoring: Simplified log_level_from_log4j_tag().
Refactoring: Replaced lastline in the log4j parser with a seek to the beginning of the line.
Refactoring: Extracted method _read_message_continuation_lines() from the log4j parser.
Refactoring for performance: Replaced string concatination in _read_message_continuation_lines() with join().
Bugfix: My last commit added another \n between the lines of multiline messages.
Refactoring: Simplified _read_message_continuation_lines(); extracted _is_continuation_line(); removed dead try/except.
Refactoring: Extracted _read_flow_id() and _read_thread() methods.
Refactoring: Extracted _read_code_position() method and simplified its body.
Refactoring: Extracted _read_log_level() and _read_message() methods. Folded log_level_from_log4j_tag() and _read_message_continuation_lines() into them.
Made _read_log_level() and _read_code_position() resilent against malformed input.
Additional tests for the log4j parser's read() method.
Rewrote the auto_configure method of the log4j parser so that it might actually work.
Refactoring: Some gratitious renaming. I couldn't stand "Log4Jparser" anymore, and took care of the some misleading variable names given that opportunity.
Trivial stuff.
Refactoring: Extracted the method _seek_tail_from_sincedb() from LogReader._seek_tail().
Refactored _seek_tail_from_sincedb().