diff --git a/deployment/src/main/java/io/quarkiverse/loggingmanager/deployment/LoggingManagerConfig.java b/deployment/src/main/java/io/quarkiverse/loggingmanager/deployment/LoggingManagerConfig.java index e9e7d7b..73aad3f 100644 --- a/deployment/src/main/java/io/quarkiverse/loggingmanager/deployment/LoggingManagerConfig.java +++ b/deployment/src/main/java/io/quarkiverse/loggingmanager/deployment/LoggingManagerConfig.java @@ -32,6 +32,12 @@ public class LoggingManagerConfig { @ConfigItem(defaultValue = "true") boolean alwaysInclude; + /** + * The number of history log entries to remember. + */ + @ConfigItem(defaultValue = "50") + public int historySize; + /** * UI configuration */ diff --git a/deployment/src/main/java/io/quarkiverse/loggingmanager/deployment/LoggingManagerProcessor.java b/deployment/src/main/java/io/quarkiverse/loggingmanager/deployment/LoggingManagerProcessor.java index 30c4ebc..92b5621 100644 --- a/deployment/src/main/java/io/quarkiverse/loggingmanager/deployment/LoggingManagerProcessor.java +++ b/deployment/src/main/java/io/quarkiverse/loggingmanager/deployment/LoggingManagerProcessor.java @@ -153,7 +153,6 @@ void includeUiAndWebsocket( if (launchMode.getLaunchMode().isDevOrTest()) { // The static resources - // TODO: Make this public in core Path tempPath = WebJarUtil.createResourcesDirectory(userApplication, artifact); Path indexHtml = Paths.get(tempPath.toString(), INDEX_HTML); @@ -192,9 +191,10 @@ void includeUiAndWebsocket( @BuildStep @Record(ExecutionTime.STATIC_INIT) public HistoryHandlerBuildItem hander(BuildProducer logHandlerBuildItemBuildProducer, - LogStreamRecorder recorder) { - // Should be made configurable: - RuntimeValue> handler = recorder.handler(50); + LogStreamRecorder recorder, + LoggingManagerConfig loggingManagerConfig) { + + RuntimeValue> handler = recorder.handler(loggingManagerConfig.historySize); logHandlerBuildItemBuildProducer.produce(new LogHandlerBuildItem((RuntimeValue) handler)); return new HistoryHandlerBuildItem(handler); }