logging: redirect test output and modify test messages

This patch continues my previous work on log4j logging.  Outputs for std.out, std.err and log4j during the tests are redirected to local files in target/surefire-reports.  Refactor some tests and make the printout more clear.