Set the log_function in Runner.start_server.

This commit is contained in:
Dave Shawley 2015-08-28 10:57:06 -04:00
parent b0712e7ef2
commit da0a9f5a8f

View file

@ -11,6 +11,8 @@ import signal
from tornado import httpserver, ioloop from tornado import httpserver, ioloop
import sprockets.logging
class Runner(object): class Runner(object):
""" """
@ -63,6 +65,8 @@ class Runner(object):
self.logger.info('starting 1 process on port %d', port_number) self.logger.info('starting 1 process on port %d', port_number)
self.server.listen(port_number) self.server.listen(port_number)
else: else:
self.application.settings.setdefault(
'log_function', sprockets.logging.tornado_log_function)
self.logger.info('starting processes on port %d', port_number) self.logger.info('starting processes on port %d', port_number)
self.server.bind(port_number) self.server.bind(port_number)
self.server.start(0) self.server.start(0)