Closed mhdirkse closed 2 years ago
I have tested that frankDocDetails.log
is overwritten each time you do the unit tests of the frank-runner project. The file contains all trace-level logs that are written in all unit tests.
We do not get frankDocDetails.log
outside the unit tests. I tested this by executing the F!F build.
The TODO items at the top of this issue were written because the scope of this issue had become larger. The PR as it is now serves the original purpose: testing that the trace statements work.
File src/test/resources/log4j2.xml
is more complicated than needed. This file should only take care of enabling log level TRACE when the unit tests run. The unit tests do not check the error catching appender, so it can be removed. We also do not need a separate file with log statements. I would like to check whether the console output is captured somewhere. If so, logging to the console is sufficient and the additional appender to a file can be removed.
@nielsm5 and @gvanbrakel, is adding src/test/resources/log4j2.xml
the way to go? Or should I apply Niels' idea to supply multiple log file names and have log4j2 combine them?
The console output is indeed captured. The console output of each unit test is written in a different text file. Each of these text files is stored in directory target/surefire-reports
. I will update this PR to have only one appender.
The change as it is now does the following:
frankDocDetails.log
.TODO:
.gitignore
.frankDocDetails.log
is cleared for every new run of the doclet.