Java 8 has reached end of support
and will be
deprecated
on January 31, 2026. After deprecation, you won't be able to deploy Java 8
applications, even if your organization previously used an organization policy to
re-enable deployments of legacy runtimes. Your existing Java
8 applications will continue to run and receive traffic after their
deprecation date. We recommend that
you
migrate to the latest supported version of Java.
LogQuery.Builder (Google App Engine API for Java)
Stay organized with collections
Save and categorize content based on your preferences.
- java.lang.Object
-
- com.google.appengine.api.log.LogQuery.Builder
-
- Enclosing class:
- LogQuery
public static final class LogQuery.Builder
extends java.lang.Object
Contains static creation methods for
LogQuery
.
-
-
Constructor Summary
Constructors
Constructor and Description |
Builder() |
-
Method Summary
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
withOffset
public static LogQuery withOffset(java.lang.String offset)
Create a
LogQuery
with the given offset.
Shorthand for
LogQuery.Builder.withDefaults().offset(offset);
.
Please read the
LogQuery
class javadoc for an explanation of
how offsets are used.
- Parameters:
offset
- the offset to use.
- Returns:
- The newly created LogQuery instance.
-
withStartTimeMillis
public static LogQuery withStartTimeMillis(long startTimeMillis)
Create a
LogQuery
with the given start time.
Shorthand for
LogQuery.Builder.withDefaults().startTimeMillis(startTimeMillis);
.
Please read the
LogQuery
class javadoc for an explanation of
how start time is used.
- Parameters:
startTimeMillis
- the start time to use, in milliseconds.
- Returns:
- The newly created LogQuery instance.
-
withStartTimeUsec
public static LogQuery withStartTimeUsec(long startTimeUsec)
Create a
LogQuery
with the given start time.
Shorthand for
LogQuery.Builder.withDefaults().startTimeUsec(startTimeUsec);
.
Please read the
LogQuery
class javadoc for an explanation of
how start time is used.
- Parameters:
startTimeUsec
- the start time to use, in microseconds.
- Returns:
- The newly created LogQuery instance.
-
withEndTimeMillis
public static LogQuery withEndTimeMillis(long endTimeMillis)
Create a
LogQuery
with the given end time.
Shorthand for
LogQuery.Builder.withDefaults().endTimeMillis(endTimeMillis);
.
Please read the
LogQuery
class javadoc for an explanation of
how end time is used.
- Parameters:
endTimeMillis
- the start time to use, in milliseconds.
- Returns:
- The newly created LogQuery instance.
-
withEndTimeUsec
public static LogQuery withEndTimeUsec(long endTimeUsec)
Create a
LogQuery
with the given end time.
Shorthand for
LogQuery.Builder.withDefaults().endTimeUsec(endTimeUsec);
.
Please read the
LogQuery
class javadoc for an explanation of
how end time is used.
- Parameters:
endTimeUsec
- the start time to use, in microseconds.
- Returns:
- The newly created LogQuery instance.
-
withBatchSize
public static LogQuery withBatchSize(int batchSize)
Create a
LogQuery
with the given batch size.
Shorthand for
LogQuery.Builder.withDefaults().batchSize(batchSize);
.
Please read the
LogQuery
class javadoc for an explanation of
how batch size is used.
- Parameters:
batchSize
- the batch size to set.
- Returns:
- The newly created LogQuery instance.
-
withMinLogLevel
public static LogQuery withMinLogLevel(LogService.LogLevel minLogLevel)
Create a
LogQuery
with the given minimum log level.
Shorthand for
LogQuery.Builder.withDefaults().minLogLevel(minLogLevel);
.
Please read the
LogQuery
class javadoc for an explanation of
how minimum log level is used.
- Parameters:
minLogLevel
- the minimum log level to set.
- Returns:
- The newly created LogQuery instance.
-
withIncludeIncomplete
public static LogQuery withIncludeIncomplete(boolean includeIncomplete)
Create a
LogQuery
with the given include incomplete setting.
Shorthand for
LogQuery.Builder.withDefaults().includeIncomplete(includeIncomplete);
.
Please read the
LogQuery
class javadoc for an explanation of
how include incomplete is used.
- Parameters:
includeIncomplete
- the inclusion value to set.
- Returns:
- The newly created LogQuery instance.
-
withIncludeAppLogs
public static LogQuery withIncludeAppLogs(boolean includeAppLogs)
Create a
LogQuery
with include application logs set.
Shorthand for
LogQuery.Builder.withDefaults().includeAppLogs(includeAppLogs);
.
Please read the
LogQuery
class javadoc for an explanation of
the include application logs setting.
- Parameters:
includeAppLogs
- the inclusion value to set.
- Returns:
- The newly created LogQuery instance.
-
withMajorVersionIds
public static LogQuery withMajorVersionIds(java.util.List<java.lang.String> versionIds)
Create a
LogQuery
with the given major version IDs.
Shorthand for
LogQuery.Builder.withDefaults().majorVersionIds(versionIds);
.
Please read the
LogQuery
class javadoc for an explanation of
how the list of major version ids is used.
- Parameters:
versionIds
- the major version id list to set.
- Returns:
- The newly created LogQuery instance.
-
withVersions
public static LogQuery withVersions(java.util.List<LogQuery.Version> versions)
Create a
LogQuery
with the given
LogQuery.Version
values.
Shorthand for
LogQuery.Builder.withDefaults().versions(versions);
.
Please read the
LogQuery
class javadoc for usage information.
- Parameters:
versions
- the list to set.
- Returns:
- The newly created LogQuery instance.
-
withRequestIds
public static LogQuery withRequestIds(java.util.List<java.lang.String> requestIds)
Create a
LogQuery
with the given request IDs.
Shorthand for
LogQuery.Builder.withDefaults().requestIds(requestIds);
.
See the
LogQuery
class javadoc for an explanation of
how the list of request ids is used.
- Parameters:
requestIds
- the request id list to set.
- Returns:
- The newly created LogQuery instance.
- Since:
- App Engine 1.7.4.
-
withDefaults
public static LogQuery withDefaults()
Helper method for creating a
LogQuery
instance with
default values. Please read the
LogQuery
class javadoc for an
explanation of the defaults.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-06-16 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-06-16 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eLogQuery.Builder\u003c/code\u003e class provides static methods to create instances of \u003ccode\u003eLogQuery\u003c/code\u003e for managing and querying logs.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ewithDefaults\u003c/code\u003e method allows for the creation of a \u003ccode\u003eLogQuery\u003c/code\u003e instance with predefined default values, simplifying the setup process.\u003c/p\u003e\n"],["\u003cp\u003eMethods such as \u003ccode\u003ewithOffset\u003c/code\u003e, \u003ccode\u003ewithStartTimeMillis\u003c/code\u003e, \u003ccode\u003ewithEndTimeUsec\u003c/code\u003e, and others allow the customization of \u003ccode\u003eLogQuery\u003c/code\u003e instances with specific parameters.\u003c/p\u003e\n"],["\u003cp\u003eThere are multiple methods available for specifying time ranges, including \u003ccode\u003ewithStartTimeMillis\u003c/code\u003e, \u003ccode\u003ewithStartTimeUsec\u003c/code\u003e, \u003ccode\u003ewithEndTimeMillis\u003c/code\u003e, and \u003ccode\u003ewithEndTimeUsec\u003c/code\u003e, allowing for flexible log querying within specific timeframes.\u003c/p\u003e\n"],["\u003cp\u003eThe class offers methods to configure various log query parameters, such as batch size, minimum log level, whether to include incomplete logs or application logs, and specific version or request IDs, through methods like \u003ccode\u003ewithBatchSize\u003c/code\u003e, \u003ccode\u003ewithMinLogLevel\u003c/code\u003e, \u003ccode\u003ewithIncludeIncomplete\u003c/code\u003e, \u003ccode\u003ewithIncludeAppLogs\u003c/code\u003e, \u003ccode\u003ewithMajorVersionIds\u003c/code\u003e, \u003ccode\u003ewithVersions\u003c/code\u003e, and \u003ccode\u003ewithRequestIds\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# LogQuery.Builder (Google App Engine API for Java)\n\ncom.google.appengine.api.log\n\nClass LogQuery.Builder\n----------------------\n\n- java.lang.Object\n-\n - com.google.appengine.api.log.LogQuery.Builder\n\n-\n\n Enclosing class:\n : [LogQuery](../../../../../com/google/appengine/api/log/LogQuery.html \"class in com.google.appengine.api.log\")\n\n *** ** * ** ***\n\n \u003cbr /\u003e\n\n ```\n public static final class LogQuery.Builder\n extends java.lang.Object\n ``` \nContains static creation methods for [`LogQuery`](../../../../../com/google/appengine/api/log/LogQuery.html \"class in com.google.appengine.api.log\"). \n-\n -\n\n ### Constructor Summary\n\n \u003c!-- --\u003e\n\n -\n\n ### Method Summary\n\n -\n\n ### Methods inherited from class java.lang.Object\n\n`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait` \n-\n -\n\n ### Constructor Detail\n\n\n -\n\n #### Builder\n\n ```\n public Builder()\n ```\n\n \u003c!-- --\u003e\n\n -\n\n ### Method Detail\n\n\n -\n\n #### withOffset\n\n ```\n public static LogQuery withOffset(java.lang.String offset)\n ``` \n Create a [`LogQuery`](../../../../../com/google/appengine/api/log/LogQuery.html \"class in com.google.appengine.api.log\") with the given offset. Shorthand for `LogQuery.Builder.withDefaults().offset(offset);`. Please read the [`LogQuery`](../../../../../com/google/appengine/api/log/LogQuery.html \"class in com.google.appengine.api.log\") class javadoc for an explanation of how offsets are used.\n\n Parameters:\n : `offset` - the offset to use.\n\n Returns:\n : The newly created LogQuery instance.\n\n\n -\n\n #### withStartTimeMillis\n\n ```\n public static LogQuery withStartTimeMillis(long startTimeMillis)\n ``` \n Create a [`LogQuery`](../../../../../com/google/appengine/api/log/LogQuery.html \"class in com.google.appengine.api.log\") with the given start time. Shorthand for `LogQuery.Builder.withDefaults().startTimeMillis(startTimeMillis);`. Please read the [`LogQuery`](../../../../../com/google/appengine/api/log/LogQuery.html \"class in com.google.appengine.api.log\") class javadoc for an explanation of how start time is used.\n\n Parameters:\n : `startTimeMillis` - the start time to use, in milliseconds.\n\n Returns:\n : The newly created LogQuery instance.\n\n\n -\n\n #### withStartTimeUsec\n\n ```\n public static LogQuery withStartTimeUsec(long startTimeUsec)\n ``` \n Create a [`LogQuery`](../../../../../com/google/appengine/api/log/LogQuery.html \"class in com.google.appengine.api.log\") with the given start time. Shorthand for `LogQuery.Builder.withDefaults().startTimeUsec(startTimeUsec);`. Please read the [`LogQuery`](../../../../../com/google/appengine/api/log/LogQuery.html \"class in com.google.appengine.api.log\") class javadoc for an explanation of how start time is used.\n\n Parameters:\n : `startTimeUsec` - the start time to use, in microseconds.\n\n Returns:\n : The newly created LogQuery instance.\n\n\n -\n\n #### withEndTimeMillis\n\n ```\n public static LogQuery withEndTimeMillis(long endTimeMillis)\n ``` \n Create a [`LogQuery`](../../../../../com/google/appengine/api/log/LogQuery.html \"class in com.google.appengine.api.log\") with the given end time. Shorthand for `LogQuery.Builder.withDefaults().endTimeMillis(endTimeMillis);`. Please read the [`LogQuery`](../../../../../com/google/appengine/api/log/LogQuery.html \"class in com.google.appengine.api.log\") class javadoc for an explanation of how end time is used.\n\n Parameters:\n : `endTimeMillis` - the start time to use, in milliseconds.\n\n Returns:\n : The newly created LogQuery instance.\n\n\n -\n\n #### withEndTimeUsec\n\n ```\n public static LogQuery withEndTimeUsec(long endTimeUsec)\n ``` \n Create a [`LogQuery`](../../../../../com/google/appengine/api/log/LogQuery.html \"class in com.google.appengine.api.log\") with the given end time. Shorthand for `LogQuery.Builder.withDefaults().endTimeUsec(endTimeUsec);`. Please read the [`LogQuery`](../../../../../com/google/appengine/api/log/LogQuery.html \"class in com.google.appengine.api.log\") class javadoc for an explanation of how end time is used.\n\n Parameters:\n : `endTimeUsec` - the start time to use, in microseconds.\n\n Returns:\n : The newly created LogQuery instance.\n\n\n -\n\n #### withBatchSize\n\n ```\n public static LogQuery withBatchSize(int batchSize)\n ``` \n Create a [`LogQuery`](../../../../../com/google/appengine/api/log/LogQuery.html \"class in com.google.appengine.api.log\") with the given batch size. Shorthand for `LogQuery.Builder.withDefaults().batchSize(batchSize);`. Please read the [`LogQuery`](../../../../../com/google/appengine/api/log/LogQuery.html \"class in com.google.appengine.api.log\") class javadoc for an explanation of how batch size is used.\n\n Parameters:\n : `batchSize` - the batch size to set.\n\n Returns:\n : The newly created LogQuery instance.\n\n\n -\n\n #### withMinLogLevel\n\n ```\n public static LogQuery withMinLogLevel(LogService.LogLevel minLogLevel)\n ``` \n Create a [`LogQuery`](../../../../../com/google/appengine/api/log/LogQuery.html \"class in com.google.appengine.api.log\") with the given minimum log level. Shorthand for `LogQuery.Builder.withDefaults().minLogLevel(minLogLevel);`. Please read the [`LogQuery`](../../../../../com/google/appengine/api/log/LogQuery.html \"class in com.google.appengine.api.log\") class javadoc for an explanation of how minimum log level is used.\n\n Parameters:\n : `minLogLevel` - the minimum log level to set.\n\n Returns:\n : The newly created LogQuery instance.\n\n\n -\n\n #### withIncludeIncomplete\n\n ```\n public static LogQuery withIncludeIncomplete(boolean includeIncomplete)\n ``` \n Create a [`LogQuery`](../../../../../com/google/appengine/api/log/LogQuery.html \"class in com.google.appengine.api.log\") with the given include incomplete setting. Shorthand for `LogQuery.Builder.withDefaults().includeIncomplete(includeIncomplete);`. Please read the [`LogQuery`](../../../../../com/google/appengine/api/log/LogQuery.html \"class in com.google.appengine.api.log\") class javadoc for an explanation of how include incomplete is used.\n\n Parameters:\n : `includeIncomplete` - the inclusion value to set.\n\n Returns:\n : The newly created LogQuery instance.\n\n\n -\n\n #### withIncludeAppLogs\n\n ```\n public static LogQuery withIncludeAppLogs(boolean includeAppLogs)\n ``` \n Create a [`LogQuery`](../../../../../com/google/appengine/api/log/LogQuery.html \"class in com.google.appengine.api.log\") with include application logs set. Shorthand for `LogQuery.Builder.withDefaults().includeAppLogs(includeAppLogs);`. Please read the [`LogQuery`](../../../../../com/google/appengine/api/log/LogQuery.html \"class in com.google.appengine.api.log\") class javadoc for an explanation of the include application logs setting.\n\n Parameters:\n : `includeAppLogs` - the inclusion value to set.\n\n Returns:\n : The newly created LogQuery instance.\n\n\n -\n\n #### withMajorVersionIds\n\n ```\n public static LogQuery withMajorVersionIds(java.util.List\u003cjava.lang.String\u003e versionIds)\n ``` \n Create a [`LogQuery`](../../../../../com/google/appengine/api/log/LogQuery.html \"class in com.google.appengine.api.log\") with the given major version IDs. Shorthand for `LogQuery.Builder.withDefaults().majorVersionIds(versionIds);`. Please read the [`LogQuery`](../../../../../com/google/appengine/api/log/LogQuery.html \"class in com.google.appengine.api.log\") class javadoc for an explanation of how the list of major version ids is used.\n\n Parameters:\n : `versionIds` - the major version id list to set.\n\n Returns:\n : The newly created LogQuery instance.\n\n\n -\n\n #### withVersions\n\n ```\n public static LogQuery withVersions(java.util.List\u003cLogQuery.Version\u003e versions)\n ``` \n Create a [`LogQuery`](../../../../../com/google/appengine/api/log/LogQuery.html \"class in com.google.appengine.api.log\") with the given [`LogQuery.Version`](../../../../../com/google/appengine/api/log/LogQuery.Version.html \"class in com.google.appengine.api.log\") values. Shorthand for `LogQuery.Builder.withDefaults().versions(versions);`. Please read the [`LogQuery`](../../../../../com/google/appengine/api/log/LogQuery.html \"class in com.google.appengine.api.log\") class javadoc for usage information.\n\n Parameters:\n : `versions` - the list to set.\n\n Returns:\n : The newly created LogQuery instance.\n\n\n -\n\n #### withRequestIds\n\n ```\n public static LogQuery withRequestIds(java.util.List\u003cjava.lang.String\u003e requestIds)\n ``` \n Create a [`LogQuery`](../../../../../com/google/appengine/api/log/LogQuery.html \"class in com.google.appengine.api.log\") with the given request IDs. Shorthand for `LogQuery.Builder.withDefaults().requestIds(requestIds);`. See the [`LogQuery`](../../../../../com/google/appengine/api/log/LogQuery.html \"class in com.google.appengine.api.log\") class javadoc for an explanation of how the list of request ids is used.\n\n Parameters:\n : `requestIds` - the request id list to set.\n\n Returns:\n : The newly created LogQuery instance.\n\n Since:\n : App Engine 1.7.4.\n\n\n -\n\n #### withDefaults\n\n ```\n public static LogQuery withDefaults()\n ``` \n Helper method for creating a [`LogQuery`](../../../../../com/google/appengine/api/log/LogQuery.html \"class in com.google.appengine.api.log\") instance with default values. Please read the [`LogQuery`](../../../../../com/google/appengine/api/log/LogQuery.html \"class in com.google.appengine.api.log\") class javadoc for an explanation of the defaults."]]