It turns out I had the ELEM_NAME wrong. I had set it to be the same as the plugin ID, but it needs to be the same as the element it's handling. In this case, "message".
Custom plugin not logging
Domanda
I've made a custom component, and I'm currently trying to check the logs at logs/tigase.log.0 to check if it's working. However, I can't find any of the plugin's logs, even though I see it as active using PSI (as well as the tigase-console.log)
I've enabled the debugging in the properties:
--debug=server,xmpp.impl,xmpp.XMPPIOService
--debug-packages=customplugin.tigase
--sm-plugins=+jabber:iq:register,+jabber:iq:auth,+urn:ietf:params:xml:ns:xmpp-sasl,+urn:ietf:params:xml:ns:xmpp-bind,+urn:ietf:params:xml:ns:xmpp-session,+roster-presence,+jabber:iq:privacy,+jabber:iq:version,+http://jabber.org/protocol/stats,+starttls,+msgoffline,+vcard-temp,+http://jabber.org/protocol/commands,+jabber:iq:private,+urn:xmpp:ping,+basic-filter,+domain-filter,-message,-message-all,+message-carbons,+amp,+customplugin
For testing, inside the plugin I've tried the following:
log.log(Level.FINEST, "ryuu:ryuu");
log.log(Level.ALL, "ryuu:ryuu");
log.log(Level.INFO, "ryuu:ryuu");
log.log(Level.SEVERE, "ryuu:ryuu");
But when I try to tail tigase's logs (which the plugin should output to):
tail -f logs/tigase.log.0 | grep "ryuu:ryuu"
I don't get anything at all, even though I can see the plugin is active using PSI's commands. What might be the reason for that?
Soluzione
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow