Logs a response.
10550
protected final <R extends Response> R logResponse(R response) {
    LOGGER.trace("{} - Sending {}", context.getCluster().member().address(), response);
    return response;
  }
239730
def send_response(self, code, message=None):
        """"""
        self.log_request(code)
        if message is None:
            message = code in self.responses and self.responses[code][0] or ""
        if self.request_version != "HTTP/0.9":
            hdr = "%s %d %s\r\n" % (self.protocol_version, code, message)
            self.wfile.write(hdr.encode("ascii"))
1168149
def process_response(self, req, resp, resource):
        
        if 'result' not in req.context:
            return
        req.context['result']['is_login'] = 'user_id' in req.env['session']
        if settings.DEBUG:
            req.context['result']['_debug_queries'] = sys._debug_db_queries
            sys._debug_db_queries = []
        if resp.body is None and req.context['result']:
            resp.body = json.dumps(req.context['result'])

        try:
            log.debug("RESPONSE: %s" % resp.body)
        except:
            log.exception("ERR: RESPONSE CANT BE LOGGED ")
167824
def log(self, text, key="?????", force=False):
        """"""
        if force or self.verbose:
            print ">>>> {} {}".format(key, text)
            sys.stdout.flush()
1189808
def _respond(self, resp):
        """"""
        response_queue = self._response_queues.get(timeout=0.1)
        response_queue.put(resp)
        self._completed_response_lines = []
        self._is_multiline = None
554508
def log_request(self, code='-', size='-'):
        """"""
        print_size = getattr(thread_local, 'size', -1)
        if size != '-':
            size_str = ' (%s)' % size
        elif print_size >= 0:
            size_str = self.log_size_string(print_size) + ' '
        else:
            size_str = ''
        if not self.server.suppress_noise or (code != 200 and code != 304):
            self.log_message(
                '%s"%s" %s', size_str, self.requestline, str(code))
        if print_size >= 0:
            thread_local.size = -1
311940
protected void logResponse(String logMessage, MessageContext messageContext, boolean incoming) throws TransformerException {
        if (messageContext.hasResponse()) {
            if (messageContext.getResponse() instanceof SoapMessage) {
                logSoapMessage(logMessage, (SoapMessage) messageContext.getResponse(), incoming);
            } else {
                logWebServiceMessage(logMessage, messageContext.getResponse(), incoming);
            }
        }
    }
113715
def should_log(self, request, response):
        
        return self.logging_methods == '__all__' or request.method in self.logging_methods
1115793
function (res, res_obj) {

    // return response if exist, otherwise response might be returned 
    // AFTER some callback is done handling (i.e., response will be returned within the handler)
    if (typeof res_obj === 'string') {
        LOG.sys('replying a string: ' + res_obj);
        res.writeHead(200, {'Content-Type': 'text/plain'});                     
        res.end(res_obj);            
    }
    else {
        LOG.sys('replying a JSON: ' + JSON.stringify(res_obj));
        res.writeHead(200, {'Content-Type': 'application/json'});                     
        res.end(JSON.stringify(res_obj));        
    }
}
1135419
def log_stop(self, start):
        """"""
        if not logger.isEnabledFor(logging.INFO): return

        stop = time.time()
        get_elapsed = lambda start, stop, multiplier, rnd: round(abs(stop - start) * float(multiplier), rnd)
        elapsed = get_elapsed(start, stop, 1000.00, 1)
        total = "%0.1f ms" % (elapsed)
        logger.info("RESPONSE {} {} in {}".format(self.response.code, self.response.status, total))
256710
protected final <R extends PrimaryBackupResponse> R logResponse(R response) {
    log.trace("Sending {}", response);
    return response;
  }
138085
function loggingMiddleware(req, res, next) {
  logRequest(req, res);
  setupResponseInterceptors(req, res);
  next();
}
870750
def _log(message):
        
        #  @todo Replace with log package.
        print(time.strftime('%Y-%m-%d %H:%M:%S', time.localtime()) + ' ' + str(message), flush=True)
1283647
def log_request(self, handler: web.RequestHandler) -> None:
        """"""
        if 'log_function' in self.settings:
            self.settings['log_function'](handler)
            return
        status = handler.get_status()
        if status < 400:
            log_method = logger.info
        elif status < 500:
            log_method = logger.warning
        else:
            log_method = logger.error
        request_time = 1000.0 * handler.request.request_time()
        if request_time > 10:
            logger.warning('%d %s %.2fms',
                           status, handler._request_summary(), request_time)
        else:
            log_method('%d %s', status, handler._request_summary())
1002366
def log(logger, level, message):
    """"""

    if logger.parent.name != 'root':
        logger.log(level, message)
    else:
        print(message, file=sys.stderr)
591282
protected function logResponse()
    {
        $logger = new Logger('Laravel-FCM');
        $logger->pushHandler(new StreamHandler(storage_path('logs/laravel-fcm.log')));

        $logMessage = "notification send to group: $this->to";
        $logMessage .= "with $this->numberTokensSuccess success and $this->numberTokensFailure";

        $logger->info($logMessage);
    }
1340497
static void sendResponse(String output, HttpServletResponse response)
      throws IOException {
    PrintWriter out = null;
    try {
      out = response.getWriter();
      out.write(output);
    } finally {
      if (out != null) {
        out.close();
      }
    }
  }