fix passing levelname to log()