Setting log levels
I am trying to parse a rather large diff file with UnifiedDiff udf = UnifiedDiffReader.parseUnifiedDiff(diff);
It is choking on the file and giving me the error message:
Jul 28, 2022 12:52:33 AM com.github.difflib.unifieddiff.UnifiedDiffReader processLine
WARNING: >>> no rule matched
Exception in thread "main" com.github.difflib.unifieddiff.UnifiedDiffParserException: expected file start line not found
at com.github.difflib.unifieddiff.UnifiedDiffReader.parse(UnifiedDiffReader.java:120)
at com.github.difflib.unifieddiff.UnifiedDiffReader.parseUnifiedDiff(UnifiedDiffReader.java:191)
The source code shows that the "no rule matched" line is supposed to include the offending line, but in this case that is an empty line. Naturally I want to turn on some finer logging to show some context of the previous lines so I can find the bad line in my diff file. How do I do that?
BTW the error message could be greatly improved by including the line number.
To increase log level use a logging properties. The surefire plugin in the project is already configured this way.
However better log messages is always a good way to improve user experience.
Stale issue message