We are using log_message everywhere (Ned asked us to use it to not pollute test output), not logger.debug. Will it work in when servers are executing in threads?

--
Sincerely,  
Alexander Kryklia
Отправлено при помощи Sparrow (http://www.sparrowmailapp.com/?sig)


среда, 18 декабря 2013 г. в 15:41, Will Daly написал:

> In common/djangoapps/terrain/stubs/http.py:
> > + # Should be a subclass of `StubHttpRequestHandler` > + HANDLER_CLASS = StubHttpRequestHandler > + > + def __init__(self, port_num=0): > + """ > + Configure the server to listen on localhost. > + Default is to choose an arbitrary open port. > + """ > + address = ('127.0.0.1', port_num) > + HTTPServer.__init__(self, address, self.HANDLER_CLASS) > + > + # Create a dict to store configuration values set by the client > + self._config = dict() > + > + # Start the server in a separate thread > + server_thread = threading.Thread(target=self.serve_forever)  
> The logs will go wherever the log handler sends them. You can configure this using the Python logging library (http://docs.python.org/2/library/logging.html). By default, I believe they go to the console, but only if you have the log level set to "debug".
>  
> —
> Reply to this email directly or view it on GitHub (https://github.com/edx/edx-platform/pull/1965/files#r8435837).
>  
>  
>