com.google.appengine.api.log.dev

## Class LocalLogService

- java.lang.Object
- - AbstractLocalRpcService
  - - com.google.appengine.api.log.dev.LocalLogService

-     @ServiceProvider(value=)
      public class LocalLogService
      extends AbstractLocalRpcService

  Implementation of local log service.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `PACKAGE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `LocalLogService()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addAppLogLine(java.lang.String requestId, long time, int level, java.lang.String message)`
    `void` | `addRequestInfo(java.lang.String appId, java.lang.String versionId, java.lang.String requestId, java.lang.String ip, java.lang.String nickname, long startTimeUsec, long endTimeUsec, java.lang.String method, java.lang.String resource, java.lang.String httpVersion, java.lang.String userAgent, boolean complete, java.lang.Integer status, java.lang.String referrer)`
    `void` | `addRequestInfo(java.lang.String appId, java.lang.String serverId, java.lang.String versionId, java.lang.String requestId, java.lang.String ip, java.lang.String nickname, long startTimeUsec, long endTimeUsec, java.lang.String method, java.lang.String resource, java.lang.String httpVersion, java.lang.String userAgent, boolean complete, java.lang.Integer status, java.lang.String referrer)`
    `void` | `clear()` Clears out the internal logs stored.
    `void` | `clearResponseSize()` Clears a response size previously registered by calling `registerResponseSize(long)`.
    `java.util.logging.Handler` | `getLogHandler()`
    `java.lang.String` | `getPackage()`
    `java.lang.Long` | `getResponseSize()`
    `LogReadResponse` | `read(Status status, LogReadRequest request)` Reads log records from the in-memory log list and applies user-specified filters to the results to return.
    `void` | `registerResponseSize(long responseSize)` Registers the response size of a request for use by `addRequestInfo(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)`.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### PACKAGE

          public static final java.lang.String PACKAGE

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### LocalLogService

          public LocalLogService()

  - ### Method Detail

    - #### getPackage

          public java.lang.String getPackage()

      Returns:
        The package name associated with this API.

    - #### read

          public LogReadResponse read(Status status,
                             LogReadRequest request)

      Reads log records from the in-memory log list and applies user-specified filters to the results to return.
      Parameters:
        `status` -
        `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 by `addRequestInfo(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 calls `addRequestInfo(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)`
      Parameters:
        `responseSize` -

    - #### getResponseSize

          public java.lang.Long getResponseSize()

    - #### clearResponseSize

          public void clearResponseSize()

      Clears a response size previously registered by calling `registerResponseSize(long)`.

    - #### addRequestInfo

          public void addRequestInfo(java.lang.String appId,
                            java.lang.String versionId,
                            java.lang.String requestId,
                            java.lang.String ip,
                            java.lang.String nickname,
                            long startTimeUsec,
                            long endTimeUsec,
                            java.lang.String method,
                            java.lang.String resource,
                            java.lang.String httpVersion,
                            java.lang.String userAgent,
                            boolean complete,
                            java.lang.Integer status,
                            java.lang.String referrer)

    - #### addRequestInfo

          public void addRequestInfo(java.lang.String appId,
                            java.lang.String serverId,
                            java.lang.String versionId,
                            java.lang.String requestId,
                            java.lang.String ip,
                            java.lang.String nickname,
                            long startTimeUsec,
                            long endTimeUsec,
                            java.lang.String method,
                            java.lang.String resource,
                            java.lang.String httpVersion,
                            java.lang.String userAgent,
                            boolean complete,
                            java.lang.Integer status,
                            java.lang.String referrer)

    - #### addAppLogLine

          public void addAppLogLine(java.lang.String requestId,
                           long time,
                           int level,
                           java.lang.String message)

    - #### getLogHandler

          public java.util.logging.Handler getLogHandler()

    - #### clear

          public void clear()

      Clears out the internal logs stored.