Skip to content

Commit ba8567c

Browse files
authored
[MTM-59701] Maven in debug mode: suppress HttpClient logging (#3958)
MTM-59701 Maven in debug mode: suppress HttpClient logging
1 parent e77f0d7 commit ba8567c

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

content/microservice-sdk/java-bundle/developing-microservice.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -679,6 +679,22 @@ To pass the configuration only to the particular build, execute the following co
679679
$ mvn microservice:upload -Dupload.application.name=helloworld -Dupload.url=https://demos.cumulocity.com -Dupload.username=demos/username -Dupload.password=****** -Dskip.microservice.upload=false
680680
```
681681

682+
683+
#### Using Maven in debug mode {#using-maven-in-debug-mode}
684+
685+
Running Maven CLI commands in debug mode (for example, `mvn clean install --debug ...`) may
686+
generate a very large volume of HTTP-related log output, such as logs from resource downloads.
687+
Analyzing this data might quickly become tedious.
688+
689+
To reduce such logging information, HTTP logging can be suppressed with these command line options:
690+
```
691+
-Dorg.slf4j.simpleLogger.log.org.apache.http=off
692+
-Dorg.slf4j.simpleLogger.log.org.apache.http.wire=off
693+
```
694+
Besides `off`, `error` or `warn` might also be appropriate values. The parameters can also be added to the Maven configuration file `${MAVEN_HOME}/conf/logging/simplelogger.properties`
695+
or to the `MAVEN_OPTS` environment variable. Related documentation can be found in [Maven logging](https://maven.apache.org/maven-logging.html).
696+
697+
682698
### Heap and perm/metadata {#heap-and-permmetadata}
683699

684700
To calculate heap and perm/metadata, it takes the limit defined in the [microservice manifest](/microservice-sdk/general-aspects/#microservice-manifest) (`resources/memory`) and it is converted into Megabytes (MB). For Java applications developed using the Java Microservice SDK the minimal value is 178MB. <br>

0 commit comments

Comments
 (0)