frankframework / frank-doc

Frank!Doc
https://frankdoc.frankframework.org
Apache License 2.0
4 stars 5 forks source link

Test that the build will succeed with log level TRACE #108

Closed mhdirkse closed 2 years ago

mhdirkse commented 2 years ago

The change as it is now does the following:

TODO:

mhdirkse commented 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.

mhdirkse commented 2 years ago

We do not get frankDocDetails.log outside the unit tests. I tested this by executing the F!F build.

mhdirkse commented 2 years ago

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.

mhdirkse commented 2 years ago

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.

mhdirkse commented 2 years ago

@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?

mhdirkse commented 2 years ago

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.