简体   繁体   中英

Handling Warnings in Hybris Console

Going through my tomcat log, I have noticed this warning:

 WARN  | localhost-startStop-1 |   |  | ReleaseStrategyFactoryBean:116 | No target supplied; falling back to SequenceSizeReleaseStrategy

And I was wondering if there was a way to prevent this warning from appearing in the console?

EDIT: apparently, and according to this link , the warning happens if no method name is provided and no annotated method is found, or a null reference is provided.

So if I'm not mistaken it's something internal to Spring, and therefore I can't do anything to stop the warning from appearing in the console?

As an option you can disable logging for this particular ReleaseStrategyFactoryBean

It can be done via project.properties or local.properties.

Depending on the Hybris version you are running you should use either:

log4j.logger.org.springframework.integration.config.ReleaseStrategyFactoryBean=off

or for Hybris 6.XXX please reffer to this article:

https://help.hybris.com/6.1.0/hcd/42d818c7bac44eed9ab01757472b9dbc.html

And example is following:

log4j2.logger.hmc.name = de.hybris.platform.servicelayer.hmc
log4j2.logger.hmc.level = warn
log4j2.logger.hmc.appenderRef.stdout.ref = STDOUT

It's an issue with your code.

From the Jira issue : https://jira.spring.io/browse/INT-3298

The ReleaseStrategyFactoryBean should emit a WARN log if there is a ref attribute and no method attribute is found, and no annotated method is found. Currently, it silently falls back to using the SequenceSizeReleaseStrategy.

In 4.0, we could make this fatal.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM