log is optional