Your guitar cable obviously works, but your issue is probably with your audio preferences setup. You may need to create an "aggregate device." Scary-sounding but not particularly difficult if you follow Apple's step-by-step instructions:
The problem is that until recently Logic could only input and output audio through a single interface (or cable). It's probably trying to play back audio through your guitar cable and once you unplug it, your sound will then play back through the built-in output of your computer. The aggregate device would allow you to select different options for input and output.
Of course you could always upgrade to LE9, which eliminated this issue. With either LE9 or an aggregate device you will be able to select, for example, your guitar cable as your input device and your built-in output as your output device in Logic audio preferences.
I hope this is helpful.