Hi Julian,
What you want is a virtual audio interface and they do exist, even for free.
There are two contenders: Jack and Soundflower:
http://jackaudio.org/
http://www.cycling74.com/products/soundflower
Install either of these and you then get another audio interface in your Audio MIDI Setup. You can then choose, say, Jack as your audio out for the system so that iTunes routes to Jack. Then, in Logic, you select Jack as your input and you can record directly into Logic. Just make sure that Logic plays back to Output 1/2 so that you can hear it.
If you're after recording without using Logic, there are (paid for) applications that record whatever is coming out of another application. I use Audio Hijack Pro and love it but there is also WireTap Pro which is, reputedly, pretty good as well.
Pete
Pete