Skip to content

Commit

Permalink
Make websocket registration singular
Browse files Browse the repository at this point in the history
  • Loading branch information
GedMarc committed Aug 27, 2024
1 parent 1777712 commit 731025c
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/main/java/com/guicedee/guicedinjection/GuiceContext.java
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ private GuiceContext()
{
try
{
// String cn = "org.apache.logging.log4j.jul.LogManager";
// System.setProperty("java.util.logging.manager", cn);
// String cn = "org.apache.logging.log4j.jul.LogManager";
// System.setProperty("java.util.logging.manager", cn);

ConfigurationBuilder<BuiltConfiguration> builder =
ConfigurationBuilderFactory.newConfigurationBuilder();
Expand All @@ -115,14 +115,13 @@ private GuiceContext()
AppenderComponentBuilder appenderBuilder = builder.newAppender("Stdout", "CONSOLE")
.addAttribute("target",
ConsoleAppender.Target.SYSTEM_ERR)
//.addAttribute("additivity", "true")
//.addAttribute("additivity", "true")
;
appenderBuilder.add(builder.newLayout("PatternLayout").
addAttribute("pattern", "%d{ABSOLUTE} %-5level: %msg%n"));
builder.add(appenderBuilder);



RootLoggerComponentBuilder rootLogger = builder.newRootLogger(org.apache.logging.log4j.Level.DEBUG);
ServiceLoader<Log4JConfigurator> log4JConfigurators = ServiceLoader.load(Log4JConfigurator.class);
for (Log4JConfigurator log4jConfigurator : log4JConfigurators)
Expand Down Expand Up @@ -852,6 +851,12 @@ private void loadPostStartups()
if (!futures.isEmpty())
{
CompletableFuture.allOf(futures.toArray(new CompletableFuture[]{}))
.whenCompleteAsync((response, errors) -> {
if (errors != null)
{
log.log(Level.SEVERE, "Errors loading in post startup groups - " + value, errors);
}
})
.join();
if (ex != null)
{
Expand Down

0 comments on commit 731025c

Please sign in to comment.