Oh yes, it is Maven-specific. Surefire-specific, to be more precise. If in Surefire/Failsafe tests there is any JVM logging before Surefire has wired up its own setup for how to handle system console logs on stdOut and stdErr, or even if that happens afterwards, the JVM logging to the original system console instead of the print stream assigned to it by Surefire, this stuff ends up in dump files, AFAIR decorated with stuff like warnings and timestamps. In 2.22.2, this cannot be avoided. For 3.0.0-M6 (try the latest master snapshots), I have been pestering Tibor with fixing this, at least when using
<forkNode implementation="org.apache.maven.plugin.surefire.extensions.SurefireForkNodeFactory"/> See also: https://issues.apache.org/jira/browse/SUREFIRE-1788 https://issues.apache.org/jira/browse/SUREFIRE-1881 BTW, when I say "JVM logging", I really mean that. It could be the JRE itself logging something, e.g. if you activate certain logs in the JVM, e.g. or SSL connections or for class-loading via JVM parameter -verbose:class Of course, a Java agent is also a special case in which the JVM logs something, which Surefire does not expect. But this problem is not limited to Java agents, see above and see the Jira issues. There is too much information in Jira to quote here, but please read it if you are affected. -- Alexander Kriegisch https://scrum-master.de Bernd Eckenfels schrieb am 12.03.2022 08:06 (GMT +07:00): > Hello, > > Sounds like the default console logger for the JUL root gets the events and > writes them to stdout. > > Did you try to use an anonymous logger or specify setUseParentHandler(false) > on > your trace logger? > > Doesn’t sound very surefire or maven specific, that would also happen in a > stand alone execution. > > Gruss > Bernd > -- > http://bernd.eckenfels.net > ________________________________ > Von: Laurian Angelescu <angelescu.laur...@gmail.com> > Gesendet: Friday, March 11, 2022 3:56:16 PM > An: users@maven.apache.org <users@maven.apache.org> > Betreff: Want to understand the .dumpstream file contents > > > I've built a trivial Java agent that uses java.util.logging.Logger and a > FileHandler to trace out the program into a log file. I've attached a log file > produced as a sample: agent_03112022_064424.log. > > The point is to run some tests under instrumentation. To do so I run: > > mvn test -DargLine="-javaagent:C:\JARS\agent.jar" on a target project, also > built with Maven, to run a test suite under instrumentation. After completion, > the folder /target/surefire-reports contains file > 2022-03-11T07-01-03_983.dumpstream which contains similar information to the > agent_03 log file. > > I want to understand why the surefire dumpstream contains the traces I am > outputting using the logger in my agent code (to the agent_03 file)? The agent > is a self-contained JAR and is outputting to its own file. The surefire plugin > is running tests on a completely different package. > > The second question is how do I turn it off? > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org