You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Dave Hodson <da...@messagecast.net> on 2003/12/04 03:06:45 UTC

DefaultLogger/Log4J

I'm using Log4J instead of PoorMansLogging and could not figure out how
to remove the following debug from my logs

2003-12-03 12:02:11,124 DEBUG [Finalizer]  Host:  IP:  Session:  PINID:
UID:  DEFAULT -
org.apache.ojb.broker.cache.ObjectCacheDefaultImpl@9b42e6[
  CACHE STATISTICS
  Count of cached objects=0
  lookups=0
  failures=0
  reclaimed=0
]

After spending some time, I realized that the entry in my
log4j.properties file needs to be:

log4j.logger.DEFAULT=WARN

to only receive msgs that are level WARN or higher.

While this is fine when using PoorMans, it seems that this isn't so
great when using Log4j, as it is not readily apparent which
class/jar/application this entry is for (quite confusing)

Has there been any thought to making this something a little more
specific (and therefore easy to explain to a sysadmin,etc)?
One thought I had was, instead of making the name "DEFAULT", changing it
to "org.apache.ojb.DEFAULT", etc.  This way it is a lot more apparent
what is occuring.

Said another way:
log4j.logger.org.apache.ojb.DEFAULT=WARN

Instead of
log4j.logger.DEFAULT=WARN


Thoughts?

Dave



RE: DefaultLogger/Log4J

Posted by ghielard <gh...@deliasystems.com>.
I think if you put this line in your log4j.properties:
"log4j.logger.org.apache.ojb.broker.cache.ObjectCacheFactory=WARN"
CACHE STATISTICS logs won't be written any more.

-----Message d'origine-----
De : Dave Hodson [mailto:dave@messagecast.net]
Envoye : jeudi 4 decembre 2003 03:07
A : ojb-user@db.apache.org
Objet : DefaultLogger/Log4J


I'm using Log4J instead of PoorMansLogging and could not figure out how
to remove the following debug from my logs

2003-12-03 12:02:11,124 DEBUG [Finalizer]  Host:  IP:  Session:  PINID:
UID:  DEFAULT -
org.apache.ojb.broker.cache.ObjectCacheDefaultImpl@9b42e6[
  CACHE STATISTICS
  Count of cached objects=0
  lookups=0
  failures=0
  reclaimed=0
]

After spending some time, I realized that the entry in my
log4j.properties file needs to be:

log4j.logger.DEFAULT=WARN

to only receive msgs that are level WARN or higher.

While this is fine when using PoorMans, it seems that this isn't so
great when using Log4j, as it is not readily apparent which
class/jar/application this entry is for (quite confusing)

Has there been any thought to making this something a little more
specific (and therefore easy to explain to a sysadmin,etc)?
One thought I had was, instead of making the name "DEFAULT", changing it
to "org.apache.ojb.DEFAULT", etc.  This way it is a lot more apparent
what is occuring.

Said another way:
log4j.logger.org.apache.ojb.DEFAULT=WARN

Instead of
log4j.logger.DEFAULT=WARN


Thoughts?

Dave





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