Switch --debug to use logging framework.