Skip to content

Commit

Permalink
Merge pull request #263 from GoogleCloudPlatform:debuggingGuide
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 668399696
Change-Id: Ieaeb2c4783d7db734a3bc07df7d52932728d250f
  • Loading branch information
gae-java-bot committed Aug 28, 2024
2 parents 7ef6c65 + 249b846 commit d9f099b
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions debugging.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,38 @@
See the License for the specific language governing permissions and
limitations under the License.
-->

# Google App Engine Java Debugging Guide

## Jetty Debug Logging

To enable debug logging in your web application, add a JUL `logging.properties` file under your application's `WEB-INF` directory.

In your `appengine-web.xml` file, specify the location of the logging file as a system property:

```xml
<system-properties>
<property name="java.util.logging.config.file" value="WEB-INF/logging.properties"/>
</system-properties>
```

For runtimes using the Jetty 9.4 code path (Java 8 - Java 17), there is a known issue where debug logging will not be output unless full debug logging is enabled with `.level=ALL`.

In the Java 21 runtime with Jetty 12, more granular debug logging is available. For example:
```
.level=INFO
org.eclipse.jetty.session.level=ALL
org.eclipse.jetty.server.level=ALL
```

## Jetty Server Dump

A Jetty Server Dump is useful for debugging issues by providing details about Jetty components and their configuration, including thread pools, connectors, contexts, classloaders, servlets, and more.

To enable a Jetty Server Dump after the `AppEngineWebAppContext` is started (which may occur after the first request in RPC mode), use the following system property:

```xml
<system-properties>
<property name="jetty.server.dumpAfterStart" value="true"/>
</system-properties>
```

0 comments on commit d9f099b

Please sign in to comment.