3

I am currently using gradle to build some spring project. But when I run the project, a lot of debug messages appear. How should I disable these debug messages in the gradle configuration file?

Something like:

12:58:40.149 [main] DEBUG o.a.h.c.protocol.RequestAddCookies - CookieSpec selected: best-match 12:58:40.157 
[main] DEBUG o.a.h.c.protocol.RequestAuthCache - Auth cache not set in the context
real_paul
  • 574
  • 2
  • 22
Jeff
  • 125
  • 2
  • 5
  • 1
    What exactly do you mean when you say "run" the project. Are these messages output by your running application or by the Gradle build itself. Can you post an example of these messages? – Mark Vieira Oct 23 '14 at 15:59
  • It seems that messages come from the application itself. – Opal Oct 23 '14 at 16:26
  • Something like: 12:58:40.149 [main] DEBUG o.a.h.c.protocol.RequestAddCookies - CookieSpec selected: best-match 12:58:40.157 [main] DEBUG o.a.h.c.protocol.RequestAuthCache - Auth cache not set in the context – Jeff Oct 23 '14 at 16:59

1 Answers1

2

As mentioned in the comments the logging output comes not from gradle but rather the application more specifically HttpClient.

By default gradle logging is set to LIFECYCLE or higher, not DEBUG.

It seems that http client is indeed a bit noisy when it comes to logging. Disable HttpClient logging

Considering that you are using Spring , you might want to set the logging specifics in you logging configuration for Spring. I like using slf4j which uses so-called bridges that gather logging messages from other logging frameworks and outputs them to one configured logger implementation like logback.

Community
  • 1
  • 1
real_paul
  • 574
  • 2
  • 22