Write raw javac output to a log file
Sometimes it is useful to look at the raw javac output when running in fork mode.
With this PR, the raw javac logs will be written to target/compiler-logs/javac_*.log
maybe it would be better as optional. when debug is activated?
Making this optional would be fine, but I would not use any existing CompilerConfiguration, since my use case is easily inspecting the raw compiler output with the current configuration (well, CompilerConfiguration#isVerbose could work...). However, I also don't think that adding a new option to the CompilerConfiguration is a good idea, since (currently) only a specific usage of the javac compiler is supported.
Maybe this could be controlled with a system property?
Hi, with 7cc5d404ec7948f5d4603ef6e548454c39e68a01 we will have the output logged
Hi, writing the full log with with debug enabled does help somewhat, but is not enough for our use-case:
If I understand this correctly, the debug log would only trigger with mvn -X. While this would show the full compiler log, searching for it would be similar to searching for a needle in a haystack, since mvn -X is very verbose. In some projects, the output even exceeds the (default) scrollback line limit of most terminals.
Always, having the complete log in a separate file is, without having to recompile with different flags, is much easier to deal with. Especially in an organization, where not everyone has in-depth knowledge of the build tools.
Thus, I would prefer a solution where the logs are always written or at least configurable company wide with our parent POM.