Add extensions logging

This commit is contained in:
Erik C. Thauvin 2025-03-26 12:20:03 -07:00
parent 708550ad5c
commit af753c7ac3
Signed by: erik
GPG key ID: 776702A6A2DA330E
2 changed files with 14 additions and 3 deletions

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;
@ -116,16 +119,25 @@ public class JokeApiBuild extends Project {
} }
public static void main(String[] args) { public static void main(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 JokeApiBuild().start(args); new JokeApiBuild().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();
} }

View file

@ -40,7 +40,6 @@ import org.json.JSONObject
import java.io.IOException import java.io.IOException
import java.net.HttpURLConnection import java.net.HttpURLConnection
import java.net.URI import java.net.URI
import java.net.URL
import java.util.logging.Level import java.util.logging.Level
/** /**