Skip to content

Commit 751aa5d

Browse files
committed
feat(logging): enable logging in websocket
1 parent 6efdec3 commit 751aa5d

File tree

4 files changed

+6
-14
lines changed

4 files changed

+6
-14
lines changed

ibm_watson/speech_to_text_v1_adapter.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,5 +258,4 @@ def recognize_using_websocket(self,
258258
request.get('headers'),
259259
http_proxy_host,
260260
http_proxy_port,
261-
self.disable_ssl_verification,
262-
self.debug)
261+
self.disable_ssl_verification)

ibm_watson/text_to_speech_adapter_v1.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,5 +108,4 @@ def synthesize_using_websocket(self,
108108
request.get('headers'),
109109
http_proxy_host,
110110
http_proxy_port,
111-
self.disable_ssl_verification,
112-
self.debug)
111+
self.disable_ssl_verification)

ibm_watson/websocket/recognize_listener.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,7 @@ def __init__(self,
4242
headers,
4343
http_proxy_host=None,
4444
http_proxy_port=None,
45-
verify=None,
46-
debug=False):
45+
verify=None):
4746
self.audio_source = audio_source
4847
self.options = options
4948
self.callback = callback
@@ -54,9 +53,7 @@ def __init__(self,
5453
self.isListening = False
5554
self.verify = verify
5655

57-
if debug:
58-
logging.basicConfig(stream=sys.stdout, level=logging.DEBUG)
59-
websocket.enableTrace(True)
56+
websocket.enableTrace(True)
6057

6158
self.ws_client = websocket.WebSocketApp(
6259
self.url,

ibm_watson/websocket/synthesize_listener.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@ def __init__(self,
3636
headers,
3737
http_proxy_host=None,
3838
http_proxy_port=None,
39-
verify=None,
40-
debug=False):
39+
verify=None):
4140
self.options = options
4241
self.callback = callback
4342
self.url = url
@@ -46,9 +45,7 @@ def __init__(self,
4645
self.http_proxy_port = http_proxy_port
4746
self.verify = verify
4847

49-
if debug:
50-
logging.basicConfig(stream=sys.stdout, level=logging.DEBUG)
51-
websocket.enableTrace(True)
48+
websocket.enableTrace(True)
5249

5350
self.ws_client = websocket.WebSocketApp(
5451
self.url,

0 commit comments

Comments
 (0)