I use Lombok @Log4j to logging in my class:
com.mypackage
import lombok.extern.log4j.Log4j;
@Log4j
public MyClass{
public void myMethod(){
MyClass.log.setLevel(Level.DEBUG);
MyClass.log.error(MyClass.log.getLevel());
MyClass.log.debug("TEST DEBUG LEVEL LOGGING");
}
}
With this configuration I got only one logging :
2019-07-11 15:28:05.512 ERROR 15632 --- [nio-8080-exec-1] c.m.MyPackage : null
I don't know if I missed somthing to configure my Lombok @Log4j logging level.
***** EDIT *****
I use SpringBoot and my application.properties have no peroperty related with logging level.
I already tried this properties but without result:
logging.level.org.springframework.web: DEBUG
logging.level.org.hibernate: ERROR