Add extensions logging

This commit is contained in:
Erik C. Thauvin 2025-03-26 11:58:20 -07:00
parent 53defaedb3
commit 771e2fb208
Signed by: erik
GPG key ID: 776702A6A2DA330E

View file

@ -50,6 +50,9 @@ import rife.tools.exceptions.FileUtilsErrorException;
import java.io.File; import java.io.File;
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.*; import static rife.bld.dependencies.Repository.*;
import static rife.bld.dependencies.Scope.compile; import static rife.bld.dependencies.Scope.compile;
@ -119,16 +122,25 @@ public class PinboardPosterBuild extends Project {
} }
public static void main(final String[] args) { public static void main(final String[] args) {
// Enable detailed logging for the extensions
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 PinboardPosterBuild().start(args); new PinboardPosterBuild().start(args);
} }
@BuildCommand(summary = "Compiles the Kotlin project") @BuildCommand(summary = "Compiles the Kotlin project")
@Override @Override
public void compile() throws Exception { public void compile() throws Exception {
var options = new CompileOptions().jvmOptions("--enable-native-access=ALL-UNNAMED");
new CompileKotlinOperation() new CompileKotlinOperation()
.fromProject(this) .fromProject(this)
.compileOptions(options) .compileOptions(new CompileOptions().verbose(true))
.execute(); .execute();
} }