Я не вижу причин, по которым вы должны поддерживать уровень ведения журнала INFO
в продакшене. Как вы можете видеть на изображении ниже, Log4j
различает пять таких уровней журнала (в порядке возрастания): DEBUG, INFO, WARN, ERROR, FATAL, NONE
.
You should change the logging level of the classes to ERROR
which will enable only ERROR
and FATAL
to be captured. In production, at most it should be WARN
which will enable only WARN
, ERROR
and FATAL
logs to be captured.
How to change log level?
There are two ways to do it:
Temporary: Login to hAC (Hybris Admin Console) ▸ Platform ▸ Logging and search the fully-qualified name of a class (e.g. de.hybris.platform.jalo.flexiblesearch.FlexibleSearch
) and then change its logging level. This change will remain effective until you restart the server. Another way to do it temporarily is by using scripting but it requires knowledge of the groovy
script.
Permanent: Put the configurations into the local.properties
file. Note that it will require restarting the server to become effective. A sample configuration:
log4j.logger.my.package = WARN
log4j.logger.org.training.service.MyServiceImpl = ERROR
Further reading: https://help.sap.com/viewer/d0224eca81e249cb821f2cdf45a82ace/6.7.0.0/en-US/8c07853c866910148a00baf81ea1669e.html