You should spend some time searching through the built in VI examples. I know only a little bit about spectrum analysis, but a search on it turned up a vast quantity of example code. There is in fact a page called "Signal and Spectrum Analyzers Examples with 11 permutations of various types of example code. Any one could be what you're looking for. Just pull up LabView help (Help Menu:Contents and Index:Search), and search for Spectrum Analyzers and you'll find it.
As for data logging, scan the manual entries for the datalog file format - it may make your life easier. Otherwise, search the help files again and you'll find a fair amount of information.
So, the moral is always go to the built in labview help first, it's excellent. Only if you can't find anythin
g there should you hit the web. And don't forget the online code exchange, lots of good stuff there too.