You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by "Johnson, Clay" <cl...@vignette.com> on 2001/03/26 23:25:57 UTC

cached category coherency

Hello,

It is conventional, based on log4j examples, to declare static class
variables to hold the instance of a category named for that class:

		package foo.bar;
		class myClass {
			static Category myCategory = new
Category.getInstance(myClass.class.getName());
			...
		}

It occurs to me that this is essentially a local cache of configuration
information from the hierarchy hash table, and unless there is some
provision for updating it, in the event of reconfiguration it is stale.
Indeed, Category fields, such as priority and aai, that control logging
behavior are in that cache.

There are various ways to deal with this.  My question is, is there a
"standard" approach within log4j?

Thanks,
Clay


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