Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions org.restlet.java/org.restlet.ext.jetty/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Debug Jetty

## Add full logs

[Jetty's documentation](https://jetty.org/docs/jetty/12/programming-guide/troubleshooting/logging.html) (the `org.eclipse.jetty:jetty-slf4j-impl`is already added to the `pom.xml`).

Programmatically:
```
System.setProperty("org.eclipse.jetty.LEVEL", "TRACE");
```

Or add a `jetty-logging.properties`:
```
org.eclipse.jetty.LEVEL=TRACE
org.eclipse.jetty.client.LEVEL=TRACE
```

## Debug using JMX
You need to update the current implementation by hand.

- [activate JMX](https://jetty.org/docs/jetty/12/programming-guide/arch/jmx.html)
The Jetty server is created in class `JettyServerHelper`.

```
// Create an MBeanContainer with the platform MBeanServer.
MBeanContainer mbeanContainer = new MBeanContainer(ManagementFactory.getPlatformMBeanServer());
// Add MBeanContainer to the root component.
jettyServer.addBean(mbeanContainer);
```

- to [state tracking](https://jetty.org/docs/jetty/12/programming-guide/troubleshooting/state-tracking.html)
You can use [jconsole](https://docs.oracle.com/javase/8/docs/technotes/guides/management/jconsole.html) to check the state of MBean or just run operations on them.
5 changes: 5 additions & 0 deletions org.restlet.java/org.restlet.ext.jetty/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@
<artifactId>jetty-http3-client-transport</artifactId>
<version>${lib-jetty-version}</version>
</dependency>
<dependency>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

useful to get debug logs

<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-slf4j-impl</artifactId>
<version>${lib-jetty-version}</version>
</dependency>
<dependency>
<groupId>org.restlet</groupId>
<artifactId>org.restlet</artifactId>
Expand Down
Loading