You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-dev@db.apache.org by Ilkka Priha <im...@surfeu.fi> on 2004/05/07 23:22:24 UTC

Annoying log message in PB.retrieveReference()

Hi

We've some complicated hierarchical db tables in which we manage relations by 
our own code, e.g. auto-retrieve=false, auto-update=none, auto-delete=none. In 
such case, the PB.retrieveReference() method has proved to be extremely useful.

However, its calling frequency is *REALLY* high, which makes the info level log 
message it produces at every call quite annoying. The message consumes also some 
resources even when the log level is set to warn or higher as it still builds 
the message string.

I think the message is not very useful for such a basic method and the 
corresponding PB.retrieveAllReferences() doesn't have one. So maybe it's just a 
remainder of some test case and could be removed with no-one missing it? At 
least we would be grateful if this message disappeared

-- Ilkka

Index: PersistenceBrokerImpl.java
===================================================================
RCS file: 
/home/cvspublic/db-ojb/src/java/org/apache/ojb/broker/core/PersistenceBrokerImpl.java,v
retrieving revision 1.79
diff -u -r1.79 PersistenceBrokerImpl.java
--- PersistenceBrokerImpl.java	29 Apr 2004 08:55:46 -0000	1.79
+++ PersistenceBrokerImpl.java	7 May 2004 21:21:39 -0000
@@ -1148,8 +1148,6 @@
       */
      public void retrieveReference(Object pInstance, String pAttributeName) 
throws PersistenceBrokerException
      {
-    	logger.info("Retrieving reference named["+pAttributeName+"] on ["
-    		+pInstance.getClass().getName()+"]");
          ClassDescriptor cld = getClassDescriptor(pInstance.getClass());
          CollectionDescriptor cod = 
cld.getCollectionDescriptorByName(pAttributeName);
          if (cod != null)


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Re: Annoying log message in PB.retrieveReference()

Posted by Ilkka Priha <im...@surfeu.fi>.
Thank you, that was fast service!

-- Ilkka

Thomas Dudziak wrote:
> On Sat, 8 May 2004, Ilkka Priha wrote:
> 
> 
>>Hi
>>
>>We've some complicated hierarchical db tables in which we manage relations by 
>>our own code, e.g. auto-retrieve=false, auto-update=none, auto-delete=none. In 
>>such case, the PB.retrieveReference() method has proved to be extremely useful.
>>
>>However, its calling frequency is *REALLY* high, which makes the info level log 
>>message it produces at every call quite annoying. The message consumes also some 
>>resources even when the log level is set to warn or higher as it still builds 
>>the message string.
>>
>>I think the message is not very useful for such a basic method and the 
>>corresponding PB.retrieveAllReferences() doesn't have one. So maybe it's just a 
>>remainder of some test case and could be removed with no-one missing it? At 
>>least we would be grateful if this message disappeared
> 
> 
> There you go :-)
> 
> Tom
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-dev-help@db.apache.org
> 
> .
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Re: Annoying log message in PB.retrieveReference()

Posted by Thomas Dudziak <to...@first.gmd.de>.
On Sat, 8 May 2004, Ilkka Priha wrote:

> Hi
> 
> We've some complicated hierarchical db tables in which we manage relations by 
> our own code, e.g. auto-retrieve=false, auto-update=none, auto-delete=none. In 
> such case, the PB.retrieveReference() method has proved to be extremely useful.
> 
> However, its calling frequency is *REALLY* high, which makes the info level log 
> message it produces at every call quite annoying. The message consumes also some 
> resources even when the log level is set to warn or higher as it still builds 
> the message string.
> 
> I think the message is not very useful for such a basic method and the 
> corresponding PB.retrieveAllReferences() doesn't have one. So maybe it's just a 
> remainder of some test case and could be removed with no-one missing it? At 
> least we would be grateful if this message disappeared

There you go :-)

Tom


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org