If it is not match your local ip, you should fill the PutLogsRequest
        parameter source by yourself.
492987
def get_host_ip(logHost):
        
        s = None
        try:
            s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
            s.connect((logHost, 80))
            ip = s.getsockname()[0]
            return ip
        except Exception:
            return '127.0.0.1'
        finally:
            if s:
                s.close()
99447
@Deprecated
    public void doLogRss( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException {
        String qs = req.getQueryString();
        rsp.sendRedirect2("./log/rss"+(qs==null?"":'?'+qs));
    }
246921
def post(self, request, *args, **kwargs):
        
        with reversion.create_revision():
            reversion.set_user(request.user)
            reversion.set_comment('created through the RESTful API from ip %s' % request.META['REMOTE_ADDR'])
            return self.create(request, *args, **kwargs)
793124
function logRequest(err, res) {
    if (res) {
      let ms = new Date() - res.requestStartTime;

      var time = ms < 1000 ? `${ms}ms` : `${(ms/1000).toFixed(2)}s`;

      logRoute(`${res.req.method} ${res.statusCode} (${time}): ${res.req.originalUrl}`);
    }
  }
1200991
private Optional<Long> getMaybeTaskLogReadOffset(final String slaveHostname, final String fullPath, final Long logLength, Optional<SingularityTask> task) {
    long offset = 0;
    long maxOffset = smtpConfiguration.get().getMaxTaskLogSearchOffset();
    Optional<Pattern> maybePattern = getLogErrorRegex(task);
    Pattern pattern;
    if (maybePattern.isPresent()) {
      pattern = maybePattern.get();
    } else {
      LOG.trace("Could not get regex pattern. Reading from bottom of file instead.");
      return getMaybeTaskLogEndOfFileOffset(slaveHostname, fullPath, logLength);
    }
    long length = logLength + pattern.toString().length(); // Get extra so that we can be sure to find the error
    Optional<MesosFileChunkObject> logChunkObject;
    Optional<MesosFileChunkObject> previous = Optional.absent();

    while (offset <= maxOffset) {
      try {
        logChunkObject = sandboxManager.read(slaveHostname, fullPath, Optional.of(offset), Optional.of(length));
      } catch (RuntimeException e) {
        LOG.error("Sandboxmanager failed to read {} on slave {}", fullPath, slaveHostname, e);
        return Optional.absent();
      }
      if (logChunkObject.isPresent()) {
        if (logChunkObject.get().getData().equals("")) { // Passed end of file
          if (previous.isPresent()) { // If there was any log, get the bottom bytes of it
            long end = previous.get().getOffset() + previous.get().getData().length();
            return Optional.of(end - logLength);
          }
          return Optional.absent();
        }
        Matcher matcher = pattern.matcher(logChunkObject.get().getData());
        if (matcher.find()) {
          return Optional.of(offset + matcher.start());
        } else {
          offset += logLength;
        }
      } else { // Couldn't read anything
        LOG.error("Failed to read log file {}", fullPath);
        return Optional.absent();
      }
      previous = logChunkObject;
    }
    LOG.trace("Searched through the first {} bytes of file {} and didn't find an error. Tailing bottom of file instead", maxOffset, fullPath);
    return getMaybeTaskLogEndOfFileOffset(slaveHostname, fullPath, logLength);
  }
195327
function createLogDumpAsync(userComments, callback) {
    g_browser.updateAllInfo(
        onUpdateAllCompleted.bind(null, userComments, callback));
  }
1115130
def put(self, url: StrOrURL,
            *, data: Any=None, **kwargs: Any) -> '_RequestContextManager':
        """"""
        return _RequestContextManager(
            self._request(hdrs.METH_PUT, url,
                          data=data,
                          **kwargs))
425446
def patch(self, request, *args, **kwargs):
        
        with reversion.create_revision():
            reversion.set_user(request.user)
            reversion.set_comment('changed through the RESTful API from ip %s' % request.META['REMOTE_ADDR'])
            kwargs['partial'] = True
            return self.update(request, *args, **kwargs)
869103
async def log_source(self, **params):
		
		if params.get("message"):
			params = json.loads(params.get("message", "{}"))
		
		if not params:
			return {"error":400, "reason":"Missed required fields"}

		# Insert new source if does not exists the one

		database = client[settings.DBNAME]
		source_collection = database[settings.SOURCE]
		await source_collection.update({"public_key":params.get("public_key")}, 
						 {"$addToSet":{"source":params.get("source")}},
						 upsert=True)

		return {"result": "ok"}
419239
def putrequest(self, method, url, *args, **kwargs):
        
        self._vcr_request = Request(
            method=method,
            uri=self._uri(url),
            body="",
            headers={}
        )
        log.debug('Got {}'.format(self._vcr_request))
513311
def _put_request(self, url, headers, data=None):
        
        return self._session.put(url, headers=headers, data=data)
1299911
private TranLogConfiguration createCustomTranLogConfiguration(String recoveredServerIdentity, String logDir, boolean isPeerRecoverySupported) throws URISyntaxException {
        if (tc.isEntryEnabled())
            Tr.entry(tc, "createCustomTranLogConfiguration", new java.lang.Object[] { recoveredServerIdentity, logDir, this });

        TranLogConfiguration tlc = null;
        final java.util.Properties props = new java.util.Properties();
        java.net.URI logSettingURI = new java.net.URI(logDir);
        String scheme = logSettingURI.getScheme();
        String logSetting = logSettingURI.getAuthority();
        if (tc.isDebugEnabled())
            Tr.debug(tc, "Scheme read from URI " + scheme + ", log setting" + logSetting);
        // For the cloud and peer recovery scenarios, we'll automatically add a suffix that matches the recoveryIdentity
        if (tc.isDebugEnabled())
            Tr.debug(tc, "Test to see if peer recovery is supported -  ", isPeerRecoverySupported);
        if (isPeerRecoverySupported) {
            if (tc.isDebugEnabled())
                Tr.debug(tc, "Work with server recovery identity -  " + recoveredServerIdentity + ", reset current logdir");

            if (recoveredServerIdentity != null) {
                logDir = "custom://com.ibm.rls.jdbc.SQLRecoveryLogFactory?datasource=Liberty" +
                         ",tablesuffix=" + recoveredServerIdentity;
                if (tc.isDebugEnabled())
                    Tr.debug(tc, "log dir is now -  ", logDir);
            }
        }
        props.setProperty("LOG_DIRECTORY", logDir);
        tlc = new TranLogConfiguration(logSetting, props);

        if (tc.isEntryEnabled())
            Tr.exit(tc, "createCustomTranLogConfiguration", tlc);
        return tlc;
    }
1082159
private void sendRedirectWithStatusCode(String location, int statusCode) throws IOException
    //PQ97429	
    {
        HttpServletResponse response = (HttpServletResponse) getResponse();
        if (!response.isCommitted())
        {
            // begin 133968: part 1
            if (location == null)
            {
                throw new IllegalArgumentException("Location cannot be null in javax.servlet.http.HttpServletResponse.sendRedirect(location)");
            }
            // end 133968: part 1

            // d128646 - we might not have a writer to flush at this point...make sure we do
            // PQ77141 overrides the above defect
//		try
//		{
//			response.getWriter();
//		}
//		catch (Throwable th)
//		{
//		}

            response.resetBuffer();

            location = convertRelativeURIToURL(location);

            // 115010 - begin - make header name begin with upper case
            response.setHeader("Location", location);
            // 115010 - end
            // PQ97429
            // response.setStatus(HttpServletResponse.SC_MOVED_TEMPORARILY);
            response.setStatus(statusCode);
            // PQ97429	    

            //response.flushBuffer();  PK79143

        }
        else
        {
            throw new IllegalStateException();
        }
    }
992604
def LogHttpFrontendAccess(self, request, source=None, message_count=None):
    
    # TODO(user): generate event_id elsewhere and use it for all the log
    # messages that have to do with handling corresponding request.
    event_id = self.GetNewEventId()

    log_msg = "%s-%s [%s]: %s %s %s %s (%d)" % (
        event_id, request.source_ip, source or "<unknown>", request.method,
        request.url, request.user_agent, request.user, message_count or 0)
    logging.info(log_msg)
1197906
private void redirectToJavaLoggerProxy() {
        DefaultLoggerProxy lp = DefaultLoggerProxy.class.cast(this.loggerProxy);
        JavaLoggerProxy jlp = new JavaLoggerProxy(lp.name, lp.level);
        // the order of assignments is important
        this.javaLoggerProxy = jlp;   // isLoggable checks javaLoggerProxy if set
        this.loggerProxy = jlp;
    }
94080
def setup(self):
        ''''''
        log.debug( 'New request from address %s, port %d',  self.client_address )
        
        try:
            self.transport.load_server_moduli()
        except:
            log.exception( '(Failed to load moduli -- gex will be unsupported.)' )
            raise
        try:
            self.transport.add_server_key(self.host_key)
        except:
            if self.host_key is None:
                log.critical('Host key not set!  SSHHandler MUST define the host_key parameter.')
                raise NotImplementedError('Host key not set!  SSHHandler instance must define the host_key parameter.  Try host_key = paramiko_ssh.getRsaKeyFile("server_rsa.key").')
        
        try:
            # Tell transport to use this object as a server
            log.debug( 'Starting SSH server-side negotiation' )
            self.transport.start_server(server=self)
        except SSHException, e:
           log.warn('SSH negotiation failed. %s', e)
           raise
        
        # Accept any requested channels
        while True:
            channel = self.transport.accept(20)
            if channel is None:
                # check to see if any thread is running
                any_running = False
                for c, thread in self.channels.items():
                    if thread.is_alive():
                        any_running = True
                        break
                if not any_running:
                    break
            else:
                log.info( 'Accepted channel %s', channel )
1164665
def put(url, data=None, **kwargs):
    """"""
    _set_content_type(kwargs)
    if _content_type_is_json(kwargs) and data is not None:
        data = dumps(data)
    _log_request('PUT', url, kwargs, data)
    response = requests.put(url, data, **kwargs)
    _log_response(response)
    return response