We can use sudo_warn_set_conversation() to set a conversation function that either writes to a log file or calls syslog().