Skip to content

Commit

Permalink
Fixed bug which caused --logfile and --loglevel command line paramete…
Browse files Browse the repository at this point in the history
…rs to not be respected when running locust without zeromq. This fixes #25.
  • Loading branch information
heyman committed Jul 1, 2012
1 parent b6b35e1 commit ee71631
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
Changelog
==========

0.5.1
=====

* Fixed bug which caused --logfile and --loglevel command line parameters to not be respected when running
locust without zeromq.

0.5
===

Expand Down
6 changes: 3 additions & 3 deletions locust/rpc/socketrpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import logging
from locust.exception import LocustError

logging.basicConfig(level=logging.DEBUG)
logger = logging.getLogger(__name__)

def _recv_bytes(sock, bytes):
data = ""
Expand Down Expand Up @@ -97,7 +97,7 @@ def handle_slave(sock):
while True:
self.event_queue.put_nowait(_recv_obj(sock))
except Exception, e:
logging.info("Slave disconnected")
logger.info("Slave disconnected")
slaves.remove(sock)
if self.slave_index == len(slaves) and len(slaves) > 0:
self.slave_index -= 1
Expand All @@ -110,7 +110,7 @@ def handle_slave(sock):
def listener():
while True:
_socket, _addr = sock.accept()
logging.info("Slave connected")
logger.info("Slave connected")
slaves.append(_socket)
gevent.spawn(lambda: handle_slave(_socket))

Expand Down

0 comments on commit ee71631

Please sign in to comment.