# LogQuery
Date: 2012-02-24

## com.google.appengine.api.log
Class LogQuery

    java.lang.Object
      com.google.appengine.api.log.LogQuery

All Implemented Interfaces:
  java.lang.Cloneable

    public final class LogQuery

extends java.lang.Object
implements java.lang.Cloneable

An object that contains the various query parameters that the user wishes to use for their call to `LogService.fetch(LogQuery)`. Users are expected to use the `LogQuery.Builder` class provided here to construct a default query and then use the with* methods to modify it as they need to when building their query.

Nested Class Summary
`static class` `LogQuery.Builder` An object that builds LogQuery objects based on the possible query parameters for calls to `LogService.fetch(LogQuery)`, or its asynchronous counterpart `LogService#fetchAsync(LogQuery)`.

Constructor Summary
`LogQuery()`

Method Summary
`LogQuery` `batchSize(int batchSize)` A setter that allows for user-specified batch sizes.
`LogQuery` `endTimeUsec(long endTimeUsec)` A setter that allows for user-specified query ending times.
`java.lang.Integer` `getBatchSize()`
`java.lang.Long` `getEndTimeUsec()`
`java.lang.Boolean` `getIncludeAppLogs()`
`java.lang.Boolean` `getIncludeIncomplete()`
`java.util.List<java.lang.String>` `getMajorVersionIds()`
`LogService.LogLevel` `getMinLogLevel()`
`java.lang.String` `getOffset()`
`java.lang.Long` `getStartTimeUsec()`
`LogQuery` `includeAppLogs(boolean includeAppLogs)` A setter that allows the user to specify whether or not they want application-level logs in their results.
`LogQuery` `includeIncomplete(boolean includeIncomplete)` A setter that allows the user to specify whether or not they want incomplete request data returned in their results.
`LogQuery` `majorVersionIds(java.util.List<java.lang.String> versionIds)` A setter that allows the user to specify the major app versions whose log data should be read.
`LogQuery` `minLogLevel(LogService.LogLevel minLogLevel)` A setter that allows the user to specify the minimum logging level desired when searching the application's request logs.
`LogQuery` `offset(java.lang.String offset)` A setter that allows for user-specified query continuation offsets.
`LogQuery` `startTimeUsec(long startTimeUsec)` A setter that allows for user-specified query starting times.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### LogQuery

    public LogQuery()

Method Detail

### offset

    public LogQuery offset(java.lang.String offset)

  A setter that allows for user-specified query continuation offsets.

  Parameters:
    `offset` - A String retrieved from `RequestLogs.getOffset()` providing a starting point for this query immediately after the object the offset was retrieved from.
  Returns:
    This object, with its offset set to the user-provided one. This object is returned instead of a new one so that it this call can be chained with the other setters.

### startTimeUsec

    public LogQuery startTimeUsec(long startTimeUsec)

  A setter that allows for user-specified query starting times.

  Parameters:
    `startTimeUsec` - The earliest time for returned results (inclusive), in microseconds since the Unix epoch.
  Returns:
    This object, with its starting time set to the user-provided one. This object is returned instead of a new one so that it this call can be chained with the other setters.

### endTimeUsec

    public LogQuery endTimeUsec(long endTimeUsec)

  A setter that allows for user-specified query ending times.

  Parameters:
    `endTimeUsec` - The latest time for returned results (exclusive), in microseconds since the Unix epoch.
  Returns:
    This object, with its ending time set to the user-provided one. This object is returned instead of a new one so that it this call can be chained with the other setters.

### batchSize

    public LogQuery batchSize(int batchSize)

  A setter that allows for user-specified batch sizes. The value set must be greater than zero.

  Parameters:
    `batchSize` - The number of results to retrieve from the logs storage mechanism at a time. Regardless of this setting, a call to `LogService.fetch(LogQuery)` will continue to yield results until the query is exhausted.
  Returns:
    This object, with its batch size set to the user-provided one. This object is returned instead of a new one so that it this call can be chained with the other setters.

### minLogLevel

    public LogQuery minLogLevel(LogService.LogLevel minLogLevel)

  A setter that allows the user to specify the minimum logging level desired when searching the application's request logs.

  Parameters:
    `minLogLevel` - The minimum application log level to search for in the application's request logs.
  Returns:
    This object, with its minLogLevel set to the user-provided one. This object is returned instead of a new one so that it this call can be chained with the other setters.

### includeIncomplete

    public LogQuery includeIncomplete(boolean includeIncomplete)

  A setter that allows the user to specify whether or not they want incomplete request data returned in their results.

  Parameters:
    `includeIncomplete` - Whether or not incomplete request log info should be included in the resulting log data.
  Returns:
    This object, with its includeIncomplete set to the user-provided one. This object is returned instead of a new one so that it this call can be chained with the other setters.

### includeAppLogs

    public LogQuery includeAppLogs(boolean includeAppLogs)

  A setter that allows the user to specify whether or not they want application-level logs in their results.

  Parameters:
    `includeAppLogs` - Whether or not application-level logs should be returned in the resulting log data.
  Returns:
    This object, with its includeAppLogs set to the user-provided one. This object is returned instead of a new one so that it this call can be chained with the other setters.

### majorVersionIds

    public LogQuery majorVersionIds(java.util.List<java.lang.String> versionIds)

  A setter that allows the user to specify the major app versions whose log data should be read.

  Parameters:
    `versionIds` - The major app versions whose log data should be read.
  Returns:
    This object, with its versionIds set to the user-provided one. This object is returned instead of a new one so that it this call can be chained with the other setters.

### getOffset

    public java.lang.String getOffset()

  Returns:
    The next location where logs can be read from. This will be null if no more logs are available for the given query parameters.

### getBatchSize

    public java.lang.Integer getBatchSize()

  Returns:
    The maximum number of results that a single call to `LogService.fetch(LogQuery)` can return.

### getEndTimeUsec

    public java.lang.Long getEndTimeUsec()

  Returns:
    The latest time that request data queried for should possess (exclusive), in microseconds since the Unix epoch. This will be null if it has not been previously set.

### getIncludeAppLogs

    public java.lang.Boolean getIncludeAppLogs()

  Returns:
    Whether or not application-level logs should be returned.

### getIncludeIncomplete

    public java.lang.Boolean getIncludeIncomplete()

  Returns:
    Whether or not incomplete request logs should be returned.

### getMinLogLevel

    public LogService.LogLevel getMinLogLevel()

  Returns:
    The minimum log level to search for in this app's request logs.

### getStartTimeUsec

    public java.lang.Long getStartTimeUsec()

  Returns:
    The earliest time that request data queried for should possess (inclusive), in microseconds since the Unix epoch. This will be null if it has not been previously set.

### getMajorVersionIds

    public java.util.List<java.lang.String> getMajorVersionIds()

  Returns:
    The list of major app versions that should be queried over.