You could use
sink("outfile.txt") ## switch standard output to a file
summary(logmodel)
sink() ## don't forget to turn off redirection
## lots of scope for confusion here!
capture.output
may be safer/recommended because you run less risk of forgetting to un-redirect ...
writeLines(capture.output(summary(logmodel)),con="outfile.txt")
Sending the output to a CSV file doesn't really make any sense ...