Commit 12f5d867 authored by Greg Messner's avatar Greg Messner
Browse files

Added info on enabling request/response logging (#228).

parent 94bac90d
......@@ -11,7 +11,7 @@ To utilize the GitLab API for Java in your project, simply add the following dep
```java
dependencies {
...
compile group: 'org.gitlab4j', name: 'gitlab4j-api', version: '4.8.38'
compile group: 'org.gitlab4j', name: 'gitlab4j-api', version: '4.8.39'
}
```
......@@ -20,7 +20,7 @@ dependencies {
<dependency>
<groupId>org.gitlab4j</groupId>
<artifactId>gitlab4j-api</artifactId>
<version>4.8.38</version>
<version>4.8.39</version>
</dependency>
```
......@@ -96,6 +96,23 @@ GitLabApi gitLabApi = new GitLabApi(ApiVersion.V3, "http://your.gitlab.server.co
As of GitLab 11.0 support for the GitLab API v3 has been removed (see https://about.gitlab.com/2018/06/01/api-v3-removal-impending/). Support for GitLab API v3 will be removed from this library in January 2019. If you are utilizing the v3 support, please update your code before January 2019.
---
## Logging of API Requests and Responses
As of GitLab4J-API 4.8.39 support has been added to log the requests to and the responses from the
GitLab API. Enable logging using one of the following methods on the GitLabApi instance:
```java
GitLabApi gitLabApi = new GitLabApi("http://your.gitlab.server.com", "YOUR_PRIVATE_TOKEN");
// Log using the shared logger and default level of FINE
gitLabApi.enableRequestResponseLogging();
// Log using the shared logger and the INFO level
gitLabApi.enableRequestResponseLogging(java.util.logging.Level.INFO);
// Log using the specified logger and the INFO level
gitLabApi.enableRequestResponseLogging(youtLoggerInstance, java.util.logging.Level.INFO);
```
---
## Results Paging
GitLab4J-API provides an easy to use paging mechanism to page through lists of results from the GitLab API.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment