how to configure Message logging in OpenFire?
On the server tab, go to Message Audit Policy. You can specify a file to log messages to, and choose which types of messages to log.
If you just want to have recent messages displayed when you join a conference room, look at History Settings on the Group Chat tab.