Configure logging level

Enable debug logging when the debug flag is true in the plugin settings.