Add extension logging

This commit is contained in:
Erik C. Thauvin 2025-03-26 13:06:32 -07:00
parent 4f9baf3d8c
commit a6b2d50fca
Signed by: erik
GPG key ID: 776702A6A2DA330E

View file

@ -49,6 +49,9 @@ import rife.tools.exceptions.FileUtilsErrorException;
import java.io.File;
import java.io.IOException;
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.Scope.compile;
@ -111,16 +114,25 @@ public class ReadingTimeBuild extends Project {
}
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 ReadingTimeBuild().start(args);
}
@BuildCommand(summary = "Compiles the Kotlin project")
@Override
public void compile() throws Exception {
var options = new CompileOptions().jvmOptions("--enable-native-access=ALL-UNNAMED");
new CompileKotlinOperation()
.fromProject(this)
.compileOptions(options)
.compileOptions(new CompileOptions().verbose(true))
.execute();
}