For access to XML logs, you need use "Debugger Plugin" for Openfire: http://www.igniterealtime.org/projects/openfire/plugins.jsp
"ORDERBY"is not to blame, it should sortin chronological order, and further limitthe resultisusing the"LIMIT"and"OFFSET".In addition,under the XEP-0136 (http://xmpp.org/extensions/xep-0136.html):
...
The server MUST list the collections (empty <chat/> elements including all attributes) in chronological order when responding to any request.
...