Package com.google.appengine.api.log.dev
Class LocalLogService
java.lang.Object
com.google.appengine.tools.development.AbstractLocalRpcService
com.google.appengine.api.log.dev.LocalLogService
- All Implemented Interfaces:
DevLogService,LocalRpcService
@AutoService(LocalRpcService.class)
public class LocalLogService
extends AbstractLocalRpcService
implements DevLogService
Implementation of local log service.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.google.appengine.tools.development.LocalRpcService
LocalRpcService.Status -
Field Summary
Fields inherited from interface com.google.appengine.tools.development.DevLogService
PACKAGE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAppLogLine(String requestId, long time, int level, String message) voidaddRequestInfo(String appId, String versionId, String requestId, @Nullable String ip, @Nullable String nickname, long startTimeUsec, long endTimeUsec, String method, String resource, String httpVersion, @Nullable String userAgent, boolean complete, @Nullable Integer status, @Nullable String referrer) voidaddRequestInfo(String appId, String moduleId, String versionId, String requestId, @Nullable String ip, @Nullable String nickname, long startTimeUsec, long endTimeUsec, String method, String resource, String httpVersion, @Nullable String userAgent, boolean complete, @Nullable Integer status, @Nullable String referrer) voidclear()Clears out the internal logs stored.voidClears a response size previously registered by callingregisterResponseSize(long).Returns the package for the service, for example, "datastore_v3".com.google.apphosting.api.logservice.LogServicePb.LogReadResponseread(LocalRpcService.Status status, com.google.apphosting.api.logservice.LogServicePb.LogReadRequest request) Reads log records from the in-memory log list and applies user-specified filters to the results to return.voidregisterResponseSize(long responseSize) Methods inherited from class com.google.appengine.tools.development.AbstractLocalRpcService
getDefaultDeadline, getMaxApiRequestSize, getMaximumDeadline, init, start, stop
-
Constructor Details
-
LocalLogService
public LocalLogService()
-
-
Method Details
-
getPackage
Description copied from interface:LocalRpcServiceReturns the package for the service, for example, "datastore_v3".- Specified by:
getPackagein interfaceLocalRpcService- Returns:
- The package name associated with this API.
-
read
public com.google.apphosting.api.logservice.LogServicePb.LogReadResponse read(LocalRpcService.Status status, com.google.apphosting.api.logservice.LogServicePb.LogReadRequest request) Reads log records from the in-memory log list and applies user-specified filters to the results to return.- Parameters:
request- A set of parameters that indicate restrictions on the results that should be returned.- Returns:
- A set of logs matching the parameters given. If the number of logs returned exceed either the user-specified amount or the API-specified limit, then an offset is returned that has a reference to the next record to read from in subsequent requests.
-
registerResponseSize
public void registerResponseSize(long responseSize) Registers the response size of a request for use byaddRequestInfo(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, long, long, java.lang.String, java.lang.String, java.lang.String, java.lang.String, boolean, java.lang.Integer, java.lang.String). This is helpful because ResponseRewriterFilter computes the response length but has no direct way to convey the information to JettyContainerService.ApiProxyHandler which callsaddRequestInfo(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, long, long, java.lang.String, java.lang.String, java.lang.String, java.lang.String, boolean, java.lang.Integer, java.lang.String) -
getResponseSize
-
clearResponseSize
public void clearResponseSize()Clears a response size previously registered by callingregisterResponseSize(long). -
addRequestInfo
public void addRequestInfo(String appId, String versionId, String requestId, @Nullable String ip, @Nullable String nickname, long startTimeUsec, long endTimeUsec, String method, String resource, String httpVersion, @Nullable String userAgent, boolean complete, @Nullable Integer status, @Nullable String referrer) -
addRequestInfo
public void addRequestInfo(String appId, String moduleId, String versionId, String requestId, @Nullable String ip, @Nullable String nickname, long startTimeUsec, long endTimeUsec, String method, String resource, String httpVersion, @Nullable String userAgent, boolean complete, @Nullable Integer status, @Nullable String referrer) -
addAppLogLine
-
getLogHandler
- Specified by:
getLogHandlerin interfaceDevLogService
-
clear
public void clear()Clears out the internal logs stored.
-