Fix default log level in echo and load tests
Since we switched to using the `logging` module to log in pull request #100, none of the messages on the 'INFO' level were being shown from `tests/echo.py` and `tests/load.py`, since the default log level is 'WARNING'. Now, the log level is set to INFO in `tests/echo.py` and `tests/load.py`, to match the log level in the main websockify executable. Fixes #109
This commit is contained in:
parent
edcfade9d8
commit
356f690286
@ -10,7 +10,7 @@ openssl req -new -x509 -days 365 -nodes -out self.pem -keyout self.pem
|
||||
as taken from http://docs.python.org/dev/library/ssl.html#certificates
|
||||
'''
|
||||
|
||||
import os, sys, select, optparse
|
||||
import os, sys, select, optparse, logging
|
||||
sys.path.insert(0,os.path.join(os.path.dirname(__file__), ".."))
|
||||
from websockify.websocket import WebSocketServer, WebSocketRequestHandler
|
||||
|
||||
@ -68,6 +68,8 @@ if __name__ == '__main__':
|
||||
except:
|
||||
parser.error("Invalid arguments")
|
||||
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
|
||||
opts.web = "."
|
||||
server = WebSocketServer(WebSocketEcho, **opts.__dict__)
|
||||
server.start_server()
|
||||
|
@ -6,7 +6,7 @@ that has a random payload (length and content) that is checksummed and
|
||||
given a sequence number. Any errors are reported and counted.
|
||||
'''
|
||||
|
||||
import sys, os, select, random, time, optparse
|
||||
import sys, os, select, random, time, optparse, logging
|
||||
sys.path.insert(0,os.path.join(os.path.dirname(__file__), ".."))
|
||||
from websockify.websocket import WebSocketServer, WebSocketRequestHandler
|
||||
|
||||
@ -162,6 +162,8 @@ if __name__ == '__main__':
|
||||
except:
|
||||
parser.error("Invalid arguments")
|
||||
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
|
||||
opts.web = "."
|
||||
server = WebSocketLoadServer(WebSocketLoad, **opts.__dict__)
|
||||
server.start_server()
|
||||
|
Loading…
Reference in New Issue
Block a user