You can install keyloggers, but this won't recover anything keyed in prior to install. You won't find keyloggers in the mac app store.
However it's not all that ethical in my book. If you don't want someone using your Mac, just password protect it on sleep.