A Comparative Study on Large Language Models for Log Parsing