[prev in list] [next in list] [prev in thread] [next in thread] 

List:       log4j-user
Subject:    Re: Question about getLogger() references
From:       clido01 () airmail ! net
Date:       2004-10-18 13:59:17
Message-ID: 55344.171.161.160.10.1098107957.squirrel () webmail ! airmail ! net
[Download RAW message or body]

Thanks Ceki, I figured it was a mixed answer.  Appreciate the info.

>
> In general, log1==log2 where log1 and log2 are defined as
>
> Logger log1=Logger.getLogger( "x" );
> Logger log2=Logger.getLogger( "x" );
>
> However, if you are using a special repository selector under the surface,
> then log1 may be different from log2.
>
>
> At 03:05 PM 10/18/2004, you wrote:
>>I have a question about the references returned via the getLogger method
>>that I hope someone can answer easily.  Assuming that multiple calls were
>>made to the Logger.getLogger() method(with the same parm), would they all
>>return exactly the same reference? ie...
>>
>>When the call:
>>
>>private static final Logger log1=Logger.getLogger( "sameclass.class" );
>>
>>is made,  and for some reason another call is made for a temporary logger
>>at some later point in the program execution:
>>
>>private Logger log2=Logger.getLogger( "sameclass.class" );
>>
>>Would the following ALWAYS be true?   log1 == log2  (reference
>>compare...not using the .equals() method)
>>
>>Thanks,
>>    Doug Clifton
>
> --
> 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-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>


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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic