From 3fc85c266cb30af2898b0d9ba99c2a8577237a41 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Wed, 7 Dec 2016 16:00:17 +0300 Subject: juick-xmpp-ft: enable logger --- .../src/main/java/com/juick/components/XMPPFTServer.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'juick-xmpp-ft/src/main/java/com') diff --git a/juick-xmpp-ft/src/main/java/com/juick/components/XMPPFTServer.java b/juick-xmpp-ft/src/main/java/com/juick/components/XMPPFTServer.java index 528604dd..236c4c0d 100644 --- a/juick-xmpp-ft/src/main/java/com/juick/components/XMPPFTServer.java +++ b/juick-xmpp-ft/src/main/java/com/juick/components/XMPPFTServer.java @@ -8,6 +8,9 @@ import org.slf4j.LoggerFactory; import org.springframework.core.env.Environment; import rocks.xmpp.addr.Jid; import rocks.xmpp.core.XmppException; +import rocks.xmpp.core.session.Extension; +import rocks.xmpp.core.session.XmppSessionConfiguration; +import rocks.xmpp.core.session.debug.LogbackDebugger; import rocks.xmpp.core.stanza.model.Message; import rocks.xmpp.extensions.component.accept.ExternalComponent; import rocks.xmpp.extensions.filetransfer.FileTransfer; @@ -33,8 +36,11 @@ public class XMPPFTServer implements AutoCloseable { private ExternalComponent component; public XMPPFTServer(Environment env) { + XmppSessionConfiguration configuration = XmppSessionConfiguration.builder() + .debugger(LogbackDebugger.class) + .build(); component = ExternalComponent.create(env.getProperty("component_name", "files"), - env.getProperty("component_password", "secret"), env.getProperty("component_host", "localhost"), + env.getProperty("component_password", "secret"), configuration, env.getProperty("component_host", "localhost"), NumberUtils.toInt(env.getProperty("component_port", "5347"), 5347)); String tmpDir = env.getProperty("upload_tmp_dir", "/tmp"); String juickJid = env.getProperty("xmppbot_jid", "juick@juick.com/Juick"); -- cgit v1.2.3