You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by Bob Morley <rm...@emforium.com> on 2010/04/05 18:06:42 UTC

Log level for entity with "never-cache" set to true

AbstractEntityConditionCache currently has a warning log message when the put
method is called for an entity that has "never-cache" set to true.  These
messages literally flood our ofbiz log files on our servers because it is
our standard practice to make heavy use of the application caching in Ofbiz.

Would anyone have issue with changing this from a warning to an info
message?  My line of thinking here, is it is good for people to make entity
calls with cache set to true and they should not have to consider the
current configuration of the entity.  If the entity happens to turn off
caching, then an info message saying it had done so is probably sufficient.

There are other similar messages such as storing by primary key that I would
change from warning -> info as well.  Internally we preferred this approach
over configuration in log4j.  The javadoc from log4j defined WARN as "The
WARN level designates potentially harmful situations." and it does not seem
to me that in this scenario that is true.

Thoughts?

-- 
View this message in context: http://n4.nabble.com/Log-level-for-entity-with-never-cache-set-to-true-tp1751748p1751748.html
Sent from the OFBiz - Dev mailing list archive at Nabble.com.

Re: Log level for entity with "never-cache" set to true

Posted by Robert Morley <rm...@emforium.com>.
Fixed as part of OFBIZ-3646.  Two things ... 1) I hope the use of  
"Patch Available" status does not exclude from your filters and 2) I  
should have made this either minor or trivial; but I left it as  
default (major) - that was not my intent.


On Apr 5, 2010, at 12:13 PM, Adrian Crum wrote:

> That sounds like an informational message to me.
>
> -Adrian
>
> Bob Morley wrote:
>> AbstractEntityConditionCache currently has a warning log message  
>> when the put
>> method is called for an entity that has "never-cache" set to true.   
>> These
>> messages literally flood our ofbiz log files on our servers because  
>> it is
>> our standard practice to make heavy use of the application caching  
>> in Ofbiz.
>> Would anyone have issue with changing this from a warning to an info
>> message?  My line of thinking here, is it is good for people to  
>> make entity
>> calls with cache set to true and they should not have to consider the
>> current configuration of the entity.  If the entity happens to turn  
>> off
>> caching, then an info message saying it had done so is probably  
>> sufficient.
>> There are other similar messages such as storing by primary key  
>> that I would
>> change from warning -> info as well.  Internally we preferred this  
>> approach
>> over configuration in log4j.  The javadoc from log4j defined WARN  
>> as "The
>> WARN level designates potentially harmful situations." and it does  
>> not seem
>> to me that in this scenario that is true.
>> Thoughts?

Robert Morley
Software Developer
Emforium Group Inc.
ALL-IN Softwareâ„¢
519-772-6824 ext 220
rmorley@emforium.com


Re: Log level for entity with "never-cache" set to true

Posted by Adrian Crum <ad...@hlmksw.com>.
That sounds like an informational message to me.

-Adrian

Bob Morley wrote:
> AbstractEntityConditionCache currently has a warning log message when the put
> method is called for an entity that has "never-cache" set to true.  These
> messages literally flood our ofbiz log files on our servers because it is
> our standard practice to make heavy use of the application caching in Ofbiz.
> 
> Would anyone have issue with changing this from a warning to an info
> message?  My line of thinking here, is it is good for people to make entity
> calls with cache set to true and they should not have to consider the
> current configuration of the entity.  If the entity happens to turn off
> caching, then an info message saying it had done so is probably sufficient.
> 
> There are other similar messages such as storing by primary key that I would
> change from warning -> info as well.  Internally we preferred this approach
> over configuration in log4j.  The javadoc from log4j defined WARN as "The
> WARN level designates potentially harmful situations." and it does not seem
> to me that in this scenario that is true.
> 
> Thoughts?
> 

Re: Log level for entity with "never-cache" set to true

Posted by Harmeet Bedi <ha...@gmail.com>.
A warning at module level may or may not be warning at app level.

One can set log levels hierarchically. So you can set 'org.ofbiz.entity' 
to be logged at warning or higher and org.ofbiz.entity.cache or 
org.ofbiz.entity.cache.AbstractEntityConditionCache at error level.

Harmeet

On 05/04/10 9:36 PM, Bob Morley wrote:
>
> AbstractEntityConditionCache currently has a warning log message when the put
> method is called for an entity that has "never-cache" set to true.  These
> messages literally flood our ofbiz log files on our servers because it is
> our standard practice to make heavy use of the application caching in Ofbiz.
>
> Would anyone have issue with changing this from a warning to an info
> message?  My line of thinking here, is it is good for people to make entity
> calls with cache set to true and they should not have to consider the
> current configuration of the entity.  If the entity happens to turn off
> caching, then an info message saying it had done so is probably sufficient.
>
> There are other similar messages such as storing by primary key that I would
> change from warning ->  info as well.  Internally we preferred this approach
> over configuration in log4j.  The javadoc from log4j defined WARN as "The
> WARN level designates potentially harmful situations." and it does not seem
> to me that in this scenario that is true.
>
> Thoughts?
>