How to save chat logs in Messages for Mountain Lion?
In Preferences, select Messages and check "Save history when conversations are closed." Now when you quit Messages, it will create a collection of chat transcripts. You can easily access these in your Library folder. From Finder, select Go>Go to Folder and type: ~/Library/Messages/Archive. If you are on Mavericks or Yosemite, the location is ~/Library/Containers/com.apple.iChat/Data/Library/Messages. This will take you directly to the appropriate folder.