While most AIM Addon's log your conversations already, there are also standalone programs.
If you find this to be a resource hog on your PC, try one of the AIM enhancers listed in this forum topic. Almost all of them feature AIM logging:
Google Desktop Search - Not only does it log your conversations in real-time, but you can also use Google to search through your conversations and find whatever your heart desires
JAMS - a collection of plugins for Triton, including EZlogger: "Saves all your IMs and chat conversations to disk. You can view saved conversations by selecting a buddy and choosing 'Show IM Logs' from the Actions menu. If no buddy is selected, the folder with all conversations is displayed."