Added BP_DEBUG variable that, if set, will enable debug logging to the console.
Moved log level code into logging configuration.