Can I log psql time and statements to a text file (without the data)?
No, it's not possible currently..


Look at PrintTiming, it is using printf. While the stuff that prints to the log file, is using fprintf. My assumption is that the patch that provides this would be a couple of lines.
You would have to have the ability to suppress the outputting of the result on --log-file, which we don't currently have. And in your case you want the summary logged SELECT 7790 but not the actual data.


.. maybe in the future.