'Write an error message to the server\'s log.
Prepends timestamp and request info to message, and writes the
result out to the WSGI server\'s error stream (`wsgi.error`).
Args:
message (str or unicode): Description of the problem. On Python 2,
instances of ``unicode`` will be converted to UTF-8.'

def log_error(self, message):

    if self.query_string:
        query_string_formatted = ('?' + self.query_string)
    else:
        query_string_formatted = ''
    log_line = DEFAULT_ERROR_LOG_FORMAT.format(now(), self.method, self.path, query_string_formatted)
    if six.PY3:
        self._wsgierrors.write(((log_line + message) + '\n'))
    else:
        if isinstance(message, unicode):
            message = message.encode('utf-8')
        self._wsgierrors.write(log_line.encode('utf-8'))
        self._wsgierrors.write((message + '\n'))
