mirror of
https://github.com/sprockets/sprockets.http.git
synced 2024-11-14 19:29:28 +00:00
Set the log_function in Runner.start_server.
This commit is contained in:
parent
b0712e7ef2
commit
da0a9f5a8f
1 changed files with 4 additions and 0 deletions
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue