logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ceki Gülcü <c...@qos.ch>
Subject Re: Thoughs on Level.java
Date Wed, 28 Jan 2004 12:32:35 GMT
At 11:45 PM 1/27/2004 -0800, Elias Ross wrote:
>On Tue, 2004-01-27 at 22:58, Elias Ross wrote:
>
> >   Level ALWAYS = new Level(ALWAYS_INT, "INFO", 7);
>
>Okay, looking at the JavaDoc, Level doesn't have a public constructor.
>Why not?  At first glace it didn't make a whole lot of sense.

Level does not have a public a constructor because Level objects are 
flyweights. The Level class enforces the fact that there is only once and 
only once instance of Level.INFO, one instance of Level.DEBUG etc. within a 
given JVM.


-- 
Ceki Gülcü

      For log4j documentation consider "The complete log4j manual"
      ISBN: 2970036908 http://www.qos.ch/shop/products/clm_t.jsp  



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


Mime
View raw message