# Interface LogService (5.0.3)

    public interface LogService

`LogService` allows callers to request the logs for an application
using supplied filters. Logs are returned in an `Iterable` that yields
[RequestLogs](https://docs.cloud.google.com/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.log.RequestLogs), which contain request-level information and optionally
[AppLogLine](https://docs.cloud.google.com/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.log.AppLogLine) objects containing the application logs from the request.

## Static Fields

### DEFAULT_ITEMS_PER_FETCH

    public static final int DEFAULT_ITEMS_PER_FETCH

The number of items that each underlying RPC call will retrieve by default.

| **Field Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

## Methods

### fetch(LogQuery query)

    public abstract Iterable<RequestLogs> fetch(LogQuery query)

Retrieve logs for the current application with the constraints provided
by the user as parameters to this function. Acts synchronously.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `query` | `https://docs.cloud.google.com/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.log.LogQuery` A LogQuery object that contains the various query parameters that should be used in the LogReadRequest. If versions and majorVersionIds are both empty, fetch will retrieve logs for the current running version. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html<https://docs.cloud.google.com/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.log.RequestLogs>` | An Iterable that contains a set of logs matching the requested filters. |