Package org.jivesoftware.smack.debugger
Class ConsoleDebugger
- java.lang.Object
-
- org.jivesoftware.smack.debugger.SmackDebugger
-
- org.jivesoftware.smack.debugger.AbstractDebugger
-
- org.jivesoftware.smack.debugger.ConsoleDebugger
-
public class ConsoleDebugger extends AbstractDebugger
Very simple debugger that prints to the console (stdout) the sent and received stanzas. Use this debugger with caution since printing to the console is an expensive operation that may even block the thread since only one thread may print at a time.It is possible to not only print the raw sent and received stanzas but also the interpreted packets by Smack. By default,interpreted packets won't be printed. To enable this feature just change the
printInterpreted
static variable totrue
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ConsoleDebugger.Factory
-
Field Summary
-
Fields inherited from class org.jivesoftware.smack.debugger.AbstractDebugger
printInterpreted
-
Fields inherited from class org.jivesoftware.smack.debugger.SmackDebugger
connection
-
-
Constructor Summary
Constructors Constructor Description ConsoleDebugger(XMPPConnection connection)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
log(String logMessage)
protected void
log(String logMessage, Throwable throwable)
-
Methods inherited from class org.jivesoftware.smack.debugger.AbstractDebugger
incomingStreamSink, onIncomingStreamElement, onOutgoingStreamElement, outgoingStreamSink, userHasLogged
-
Methods inherited from class org.jivesoftware.smack.debugger.SmackDebugger
newConnectionReader, newConnectionWriter, onIncomingElementCompleted, onOutgoingElementCompleted
-
-
-
-
Constructor Detail
-
ConsoleDebugger
public ConsoleDebugger(XMPPConnection connection)
-
-
Method Detail
-
log
protected void log(String logMessage)
- Specified by:
log
in classAbstractDebugger
-
log
protected void log(String logMessage, Throwable throwable)
- Specified by:
log
in classAbstractDebugger
-
-