# Class LogQueryResult (5.0.3)

    public final class LogQueryResult implements Iterable<RequestLogs>

An object that is the result of performing a LogService.fetch() operation. LogQueryResults
contain the logs from the user's query. Users of this service should use the [LogQueryResult#iterator](https://docs.cloud.google.com/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.log.LogQueryResult#com_google_appengine_api_log_LogQueryResult_iterator_) provided by this class to retrieve their results.

## Inheritance

[java.lang.Object](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html) \> LogQueryResult

## Implements

[Iterable\<RequestLogs\>](https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable<com/google/appengine/api/log/RequestLogs>.html)

## Inherited Members

[Object.clone()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#clone--) [Object.equals(Object)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-) [Object.finalize()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--) [Object.getClass()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--) [Object.hashCode()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--) [Object.notify()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--) [Object.notifyAll()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--) [Object.toString()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#toString--) [Object.wait()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--) [Object.wait(long)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-) [Object.wait(long,int)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-)

## Static Methods

### parseOffset(String offset)

    protected static LogServicePb.LogOffset parseOffset(String offset)

Returns a LogOffset parsed from the submitted String, which is assumed to be a Base64-encoded
offset produced by this class.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `offset` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `com.google.apphosting.api.logservice.LogServicePb.LogOffset` | A String to parse as a Base64-encoded LogOffset protocol buffer. |

## Constructors

### LogQueryResult(LogServicePb.LogReadResponse response, LogQuery originalQuery)

    protected LogQueryResult(LogServicePb.LogReadResponse response, LogQuery originalQuery)

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `response` | `com.google.apphosting.api.logservice.LogServicePb.LogReadResponse` |
| `originalQuery` | `https://docs.cloud.google.com/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.log.LogQuery` |

## Methods

### iterator()

    public Iterator<RequestLogs> iterator()

Returns an Iterator that will yield all of the logs the user has requested.
If the user has asked for more logs than a single request can accommodate
(which is LogService.MAX_ITEMS_PER_FETCH), then this iterator grabs
the first batch and returns them until they are exhausted. Once they are
exhausted, a fetch() call is made to get more logs and the process is
repeated until either all of the logs have been read or the user has
stopped asking for more logs.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/Iterator.html<https://docs.cloud.google.com/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.log.RequestLogs>` | An iterator that provides RequestLogs to the caller. |