On 01/28/2010 12:59 PM, tmortagne (SVN) wrote:
> Author: tmortagne
> Date: 2010-01-28 12:59:59 +0100 (Thu, 28 Jan 2010)
> New Revision: 26514
>
> Modified:
>     
> platform/core/trunk/xwiki-cache/xwiki-cache-jbosscache/src/main/java/org/xwiki/cache/jbosscache/internal/JBossCacheCache.java
> Log:
> XWIKI-4800: Fix warnings appearing in the logs when importing a XAR
>
> Modified: 
> platform/core/trunk/xwiki-cache/xwiki-cache-jbosscache/src/main/java/org/xwiki/cache/jbosscache/internal/JBossCacheCache.java
> ===================================================================
> --- 
> platform/core/trunk/xwiki-cache/xwiki-cache-jbosscache/src/main/java/org/xwiki/cache/jbosscache/internal/JBossCacheCache.java
>      2010-01-28 11:18:19 UTC (rev 26513)
> +++ 
> platform/core/trunk/xwiki-cache/xwiki-cache-jbosscache/src/main/java/org/xwiki/cache/jbosscache/internal/JBossCacheCache.java
>      2010-01-28 11:59:59 UTC (rev 26514)
> @@ -195,8 +195,12 @@

You used LOG.warn in nodeEvicted and LOG.info in nodeRemoved. Shouldn't 
they use the same log level?

>       public void nodeEvicted(NodeEvictedEvent event)
>       {
>           if (!event.getFqn().isChildOf(ROOT_FQN)) {
> -            if (LOG.isInfoEnabled()) {
> -                LOG.info(MessageFormat.format("The node {0} should not has 
> been evicted", event.getFqn()));
> +            if (!event.getFqn().equals(ROOT_FQN)) {
> +                LOG.warn(MessageFormat.format(
> +                    "The [{0}] node has been evicted but it should not even 
> have been part of the cache",
> +                    event.getFqn()));
> +            } else {
> +                LOG.debug("The entire cache has been evicted");
>               }
>
>               return;
> @@ -216,8 +220,12 @@
>       public void nodeRemoved(NodeRemovedEvent event)
>       {
>           if (!event.getFqn().isChildOf(ROOT_FQN)) {
> -            if (LOG.isInfoEnabled()) {
> -                LOG.info(MessageFormat.format("The node {0} should not has 
> been removed", event.getFqn()));
> +            if (!event.getFqn().equals(ROOT_FQN)) {
> +                LOG.info(MessageFormat.format(
> +                    "The [{0}] node has been removed but it should not even 
> have been part of the cache",
> +                    event.getFqn()));
> +            } else {
> +                LOG.debug("The entire cache has been removed");
>               }
>
>               return;


-- 
Sergiu Dumitriu
http://purl.org/net/sergiu/
_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs

Reply via email to