npm install @xmpp/debugPrints logs and debug information to the console for an entity.
⚠️ debug makes a best effort to replace sensitive information with but be careful not to share secrets when sharing logs.
npm install @xmpp/debug
``js
import { client } from "@xmpp/client"; // or component, ...
import debug from "@xmpp/debug";
const xmpp = client(...);
debug(xmpp); // requires process.env.XMPP_DEBUG
// or
debug(xmpp, true); // always enabled
`
Here is an example output
`xml``
status connecting
status connect
status opening
IN
SCRAM-SHA-1
PLAIN
status open
OUT
IN
OUT
IN
status opening
IN
status open
OUT
example
IN
username@localhost/example
status online username@localhost/example
online as username@localhost/example
OUT
OUT
IN
IN
OUT
status closing
IN
status close
status disconnecting
status disconnect [object Object]
status offline
offline