Spring Boot disables logging for the package

I prefer to throw my own exceptions for business logic. For example, I have a class com.mine.exception.DuplicateClientException. Is there some kind of configuration in which I can turn off stack trace printing for com.mine.exception?

Sort of:

logging.level.com.mine.exception=OFF
+4
source share
1 answer

In application.properties you can add 'logging.level. * = LEVEL, where 'LEVEL is one of TRACE, DEBUG, INFO, WARN, ERROR, FATAL, OFF. * responsible for package / class.

for instance

logging.level.root=WARN
logging.level.org.springframework.web=DEBUG
logging.level.org.hibernate=ERROR

, WARN. org.springframework.web DEBUG, ERROR.

+2

Source: https://habr.com/ru/post/1683526/


All Articles