I'am still working on a problem with the Http Builder in Java. The Builder is using a Log which is private. This Log is generated with the Logger Factory. On debugging I notice that the logger level is null and so the logs are not printed. On debugging I can change the logger level and the logs are printed. The Problem is that i can not set the Logger Level from outside of the HTTP Builder. So is it possible to set the Level of all Log property which are generated by the Log Factory ?
Asked
Active
Viewed 61 times
0
-
The "httpbuilder" tag you've set is for [this library](https://github.com/jgritman/httpbuilder), which is designed "for Groovy", is it really this one you are using? (yes it's possible to use it in Java, but I think this deserves a clarification) – Hugues M. Jul 17 '17 at 06:52
-
OK tag is now removed, but which is it? Also it's a bit weird to ask this and not follow up [that other question](https://stackoverflow.com/questions/45102453/how-to-set-up-logging-properties-for-httpbuilder-in-java) – Hugues M. Jul 17 '17 at 07:06
1 Answers
1
I managed to find a solution Just import
import ch.qos.logback.classic.Level
import ch.qos.logback.classic.Logger
And Set
Logger rootLogger = (Logger)LoggerFactory.getLogger(Logger.ROOT_LOGGER_NAME)
rootLogger.setLevel(mLevel)

Secondwave
- 225
- 1
- 4
- 17