Add an extension point for Unity log parsing
Description
Currently, Unity task is using an internal log parser with predefined log patterns (since Unity's build log doesn't mark lines with log levels):
https://github.com/nuke-build/nuke/blob/c748538e1485aaaa7788639fd9d7887cba2f31c3/source/Nuke.Common/Tools/Unity/Logging/LogParser.cs#L28-L43
I have a bunch of post-processors within my Unity project which do their own logging to the log file which don't match any of those patterns, like "ERROR CBN-0012: Some error message". It would be very useful to be able to define my own log patterns so my error messages are more distinguishable in the Nuke build logs (and also so they show up in the "repeating erros" section).
Usage Example
The most straightforward way would be to just expose the internal LineMatcher class:
UnityTasks.Unity(_ => _.SetLogLineMatchers(new [] {
new LineMatcher("ERROR CBN-*", LogLevel.Error)
}));
Exposing BlockMatcher also would be useful, since it would give us the ability to define our own blocks of processing:
UnityTasks.Unity(_ => _.SetLogBlockMatchers(new [] {
new BlockMatcher(
"Generate level hashsums",
"---- GenerateLevelHashsums Start ----",
"---- GenerateLevelHashsums End ----"
)
}));
Alternative
No response