aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com')
-rw-r--r--src/main/java/com/juick/XMPPManager.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/main/java/com/juick/XMPPManager.java b/src/main/java/com/juick/XMPPManager.java
index d4daf9a47..0c5cb2f4b 100644
--- a/src/main/java/com/juick/XMPPManager.java
+++ b/src/main/java/com/juick/XMPPManager.java
@@ -99,11 +99,13 @@ public class XMPPManager implements NotificationListener {
this.messagesService = messagesService;
this.userService = userService;
logger.info("xmpp component start connecting to {}", componentPort);
- XmppSessionConfiguration configuration = XmppSessionConfiguration.builder()
+ var configurationBuilder = XmppSessionConfiguration.builder()
.extensions(Extension.of(com.juick.model.Message.class), Extension.of(MessageQuery.class))
- .debugger(LogbackDebugger.class)
- .defaultResponseTimeout(Duration.ofMillis(120000))
- .build();
+ .defaultResponseTimeout(Duration.ofMillis(120000));
+ if (logger.isTraceEnabled()) {
+ configurationBuilder.debugger(LogbackDebugger.class);
+ }
+ var configuration = configurationBuilder.build();
xmpp = ExternalComponent.create(componentName, password, configuration, componentHost, componentPort);
ServiceDiscoveryManager serviceDiscoveryManager = xmpp.getManager(ServiceDiscoveryManager.class);
serviceDiscoveryManager.addIdentity(Identity.clientBot().withName("Juick"));