Can we log MSN or other IM Gateway chats?

As the subject states, is there a way we can log the chats from these gateways in openfire?

You need the Monitoring Service plugin for Openfire, this allows you to log all conversations, internal and via gateways.