Do logging setup earlier so that messages during argument parsing are shown.

Also add a long style argument for enabling debug.