fix compare log

logging.basicConfig() must be called before the first log output.