Skip to content

Commit

Permalink
Remove Old Dev UI Logstream WebSocket
Browse files Browse the repository at this point in the history
Signed-off-by: Phillip Kruger <[email protected]>
  • Loading branch information
phillip-kruger authored and DavideD committed Nov 27, 2023
1 parent 1dd4d8f commit 8f37b47
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 60 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@
import io.quarkus.deployment.builditem.ShutdownListenerBuildItem;
import io.quarkus.deployment.builditem.StreamingLogHandlerBuildItem;
import io.quarkus.deployment.builditem.SystemPropertyBuildItem;
import io.quarkus.deployment.builditem.WebSocketLogHandlerBuildItem;
import io.quarkus.deployment.builditem.nativeimage.NativeImageSystemPropertyBuildItem;
import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem;
import io.quarkus.deployment.builditem.nativeimage.RuntimeReinitializedClassBuildItem;
Expand Down Expand Up @@ -229,7 +228,6 @@ LoggingSetupBuildItem setupLoggingRuntimeInit(RecorderContext context, LoggingSe
CombinedIndexBuildItem combinedIndexBuildItem,
LogCategoryMinLevelDefaultsBuildItem categoryMinLevelDefaults,
Optional<StreamingLogHandlerBuildItem> streamingLogStreamHandlerBuildItem,
Optional<WebSocketLogHandlerBuildItem> wsLogStreamHandlerBuildItem,
List<LogHandlerBuildItem> handlerBuildItems,
List<NamedLogHandlersBuildItem> namedHandlerBuildItems,
List<LogConsoleFormatBuildItem> consoleFormatItems,
Expand Down Expand Up @@ -258,11 +256,6 @@ LoggingSetupBuildItem setupLoggingRuntimeInit(RecorderContext context, LoggingSe
if (bannerBuildItem != null) {
possibleSupplier = bannerBuildItem.getBannerSupplier();
}
// Old Dev UI Log Stream
RuntimeValue<Optional<Handler>> wsDevUiLogHandler = null;
if (wsLogStreamHandlerBuildItem.isPresent()) {
wsDevUiLogHandler = wsLogStreamHandlerBuildItem.get().getHandlerValue();
}

// New Dev UI Log Stream
RuntimeValue<Optional<Handler>> streamingDevUiLogHandler = null;
Expand Down Expand Up @@ -297,7 +290,7 @@ LoggingSetupBuildItem setupLoggingRuntimeInit(RecorderContext context, LoggingSe
shutdownListenerBuildItemBuildProducer.produce(new ShutdownListenerBuildItem(
recorder.initializeLogging(log, buildLog, discoveredLogComponents,
categoryMinLevelDefaults.content, alwaysEnableLogStream,
wsDevUiLogHandler, streamingDevUiLogHandler, handlers, namedHandlers,
streamingDevUiLogHandler, handlers, namedHandlers,
possibleConsoleFormatters, possibleFileFormatters, possibleSyslogFormatters,
possibleSupplier, launchModeBuildItem.getLaunchMode(), true)));
LogConfig logConfig = new LogConfig();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public static void handleFailedStart(RuntimeValue<Optional<Supplier<String>>> ba
new LoggingSetupRecorder(new RuntimeValue<>(consoleRuntimeConfig)).initializeLogging(config, buildConfig,
DiscoveredLogComponents.ofEmpty(),
Collections.emptyMap(),
false, null, null,
false, null,
Collections.emptyList(),
Collections.emptyList(),
Collections.emptyList(),
Expand All @@ -92,7 +92,6 @@ public ShutdownListener initializeLogging(LogConfig config, LogBuildTimeConfig b
DiscoveredLogComponents discoveredLogComponents,
final Map<String, InheritableLevel> categoryDefaultMinLevels,
final boolean enableWebStream,
final RuntimeValue<Optional<Handler>> wsDevUiConsoleHandler,
final RuntimeValue<Optional<Handler>> streamingDevUiConsoleHandler,
final List<RuntimeValue<Optional<Handler>>> additionalHandlers,
final List<RuntimeValue<Map<String, Handler>>> additionalNamedHandlers,
Expand Down Expand Up @@ -184,22 +183,6 @@ public void close() throws SecurityException {
}

if ((launchMode.isDevOrTest() || enableWebStream)
&& wsDevUiConsoleHandler != null
&& wsDevUiConsoleHandler.getValue().isPresent()) {

Handler handler = wsDevUiConsoleHandler.getValue().get();
handler.setErrorManager(errorManager);
handler.setFilter(new LogCleanupFilter(filterElements, shutdownNotifier));

if (possibleBannerSupplier != null && possibleBannerSupplier.getValue().isPresent()) {
Supplier<String> bannerSupplier = possibleBannerSupplier.getValue().get();
String header = "\n" + bannerSupplier.get();
handler.publish(new LogRecord(Level.INFO, header));
}
handlers.add(handler);
}

if ((launchMode.isDevOrTest())
&& streamingDevUiConsoleHandler != null
&& streamingDevUiConsoleHandler.getValue().isPresent()) {

Expand Down

0 comments on commit 8f37b47

Please sign in to comment.