Removed print for use of logging and warnings, added logfile and loglevel

Changed this up a bit. Removed all the print statements from websocket.py and changed them to log statements.

Support remains for stdout.