Only log java command and arguments on Level.FINE
This commit is contained in:
parent
4d4479bf23
commit
f9cbd63bce
5 changed files with 30 additions and 10 deletions
4
examples/.idea/misc.xml
generated
4
examples/.idea/misc.xml
generated
|
@ -3,6 +3,10 @@
|
||||||
<component name="EntryPointsManager">
|
<component name="EntryPointsManager">
|
||||||
<pattern value="com.example.ExamplesBuild" method="testng" />
|
<pattern value="com.example.ExamplesBuild" method="testng" />
|
||||||
<pattern value="com.example.ExampleTest" method="testFail" />
|
<pattern value="com.example.ExampleTest" method="testFail" />
|
||||||
|
<pattern value="com.example.ExamplesBuild" method="jacoco" />
|
||||||
|
<pattern value="com.example.ExamplesTest" />
|
||||||
|
<pattern value="com.example.ExamplesTest" method="foo" />
|
||||||
|
<pattern value="com.example.ExamplesTest" method="verifyHello" />
|
||||||
</component>
|
</component>
|
||||||
<component name="PDMPlugin">
|
<component name="PDMPlugin">
|
||||||
<option name="customRuleSets">
|
<option name="customRuleSets">
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
bld.downloadExtensionJavadoc=false
|
bld.downloadExtensionJavadoc=false
|
||||||
bld.downloadExtensionSources=true
|
bld.downloadExtensionSources=true
|
||||||
bld.extensions=com.uwyn.rife2:bld-testng:0.9.5
|
bld.extensions=com.uwyn.rife2:bld-testng:0.9.6-SNAPSHOT
|
||||||
bld.extension.jacoco=com.uwyn.rife2:bld-jacoco-report:0.9.5
|
bld.extension.jacoco=com.uwyn.rife2:bld-jacoco-report:0.9.5
|
||||||
bld.repositories=MAVEN_LOCAL,MAVEN_CENTRAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES
|
bld.repositories=MAVEN_LOCAL,MAVEN_CENTRAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES
|
||||||
bld.downloadLocation=
|
bld.downloadLocation=
|
||||||
|
|
|
@ -8,6 +8,9 @@ import rife.bld.operations.TestOperation;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.logging.ConsoleHandler;
|
||||||
|
import java.util.logging.Level;
|
||||||
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
import static rife.bld.dependencies.Repository.MAVEN_CENTRAL;
|
import static rife.bld.dependencies.Repository.MAVEN_CENTRAL;
|
||||||
import static rife.bld.dependencies.Scope.test;
|
import static rife.bld.dependencies.Scope.test;
|
||||||
|
@ -21,13 +24,6 @@ import static rife.bld.dependencies.Scope.test;
|
||||||
* </ul>
|
* </ul>
|
||||||
*/
|
*/
|
||||||
public class ExamplesBuild extends BaseProject {
|
public class ExamplesBuild extends BaseProject {
|
||||||
@Override
|
|
||||||
public TestOperation<?, ?> testOperation() {
|
|
||||||
return new TestNgOperation()
|
|
||||||
.fromProject(this)
|
|
||||||
.packages("com.example");
|
|
||||||
}
|
|
||||||
|
|
||||||
public ExamplesBuild() {
|
public ExamplesBuild() {
|
||||||
pkg = "com.example";
|
pkg = "com.example";
|
||||||
name = "Examples";
|
name = "Examples";
|
||||||
|
@ -43,6 +39,16 @@ public class ExamplesBuild extends BaseProject {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
|
// Enable detailed logging for the JaCoCo extension
|
||||||
|
var level = Level.ALL;
|
||||||
|
var logger = Logger.getLogger("rife.bld.extension");
|
||||||
|
var consoleHandler = new ConsoleHandler();
|
||||||
|
|
||||||
|
consoleHandler.setLevel(level);
|
||||||
|
logger.addHandler(consoleHandler);
|
||||||
|
logger.setLevel(level);
|
||||||
|
logger.setUseParentHandlers(false);
|
||||||
|
|
||||||
new ExamplesBuild().start(args);
|
new ExamplesBuild().start(args);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -52,4 +58,11 @@ public class ExamplesBuild extends BaseProject {
|
||||||
.fromProject(this)
|
.fromProject(this)
|
||||||
.execute();
|
.execute();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TestOperation<?, ?> testOperation() {
|
||||||
|
return new TestNgOperation()
|
||||||
|
.fromProject(this)
|
||||||
|
.packages("com.example");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,7 +34,7 @@ public class TestNgOperationBuild extends Project {
|
||||||
public TestNgOperationBuild() {
|
public TestNgOperationBuild() {
|
||||||
pkg = "rife.bld.extension";
|
pkg = "rife.bld.extension";
|
||||||
name = "bld-testng";
|
name = "bld-testng";
|
||||||
version = version(0, 9, 5);
|
version = version(0, 9, 6, "SNAPSHOT");
|
||||||
|
|
||||||
javaRelease = 17;
|
javaRelease = 17;
|
||||||
downloadSources = true;
|
downloadSources = true;
|
||||||
|
|
|
@ -184,8 +184,11 @@ public class TestNgOperation extends TestOperation<TestNgOperation, List<String>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (LOGGER.isLoggable(Level.FINE)) {
|
||||||
|
LOGGER.fine(String.join(" ", args));
|
||||||
|
}
|
||||||
|
|
||||||
if (LOGGER.isLoggable(Level.INFO)) {
|
if (LOGGER.isLoggable(Level.INFO)) {
|
||||||
LOGGER.info(String.join(" ", args));
|
|
||||||
LOGGER.info(String.format("Report will be saved in file://%s", new File(options.get("-d"))));
|
LOGGER.info(String.format("Report will be saved in file://%s", new File(options.get("-d"))));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue