1.9.30 sync.
[gae.git] / java / src / main / com / google / appengine / api / log / LogService.java
blob9315dd7944bbd19a958c12a4573b66bd6e81c55d
1 // Copyright 2011 Google Inc. All Rights Reserved.
3 package com.google.appengine.api.log;
5 /**
6 * {@code LogService} allows callers to request the logs for an application
7 * using supplied filters. Logs are returned in an {@code Iterable} that yields
8 * {@link RequestLogs}, which contain request-level information and optionally
9 * {@link AppLogLine} objects containing the application logs from the request.
12 public interface LogService {
13 /**
14 * The number of items that each underlying RPC call will retrieve by default.
16 int DEFAULT_ITEMS_PER_FETCH = 20;
18 enum LogLevel {
19 DEBUG,
20 INFO,
21 WARN,
22 ERROR,
23 FATAL,
26 /**
27 * Retrieve logs for the current application with the constraints provided
28 * by the user as parameters to this function. Acts synchronously.
30 * @param query A LogQuery object that contains the various query parameters
31 * that should be used in the LogReadRequest. If versions and majorVersionIds
32 * are both empty, fetch will retrieve logs for the current running version.
33 * @return An Iterable that contains a set of logs matching the
34 * requested filters.
36 Iterable<RequestLogs> fetch(LogQuery query);