Archive of a chat

How long does the chat log live? Is it a way for me to extract it afterwards anywhere?
I have seen that some logs lasted for a long time, but if there are no members it dissapaerad?