Moves loglevel parsing to argparse action.