Howdy,
Duh ;)  I didn't even look at the access modifier on the method.  Hmm... Let me look 
around a bit, but I guess you have no choice but the way you've been doing it...

Yoav Shapira
Millennium ChemInformatics


>-----Original Message-----
>From: Lutz Michael [mailto:[EMAIL PROTECTED]]
>Sent: Tuesday, February 04, 2003 10:41 AM
>To: 'Log4J Users List'
>Subject: RE: "forcing" a logging call
>
>
>
>Yoav,
>
>Good idea.  I'd love to do that, but unfortunately logger.forcedLog is
>protected.  This puts us in a corner.
>It can be made public in derivative classes (of course), but then we'd be
>back to the casting requirement again.
>
>I can't find a way around this without extending and casting.  If there is
>an approach I'm not thinking of, please let me know.
>
>Mike
>
>
>-----Original Message-----
>From: Shapira, Yoav [mailto:[EMAIL PROTECTED]]
>Sent: Tuesday, February 04, 2003 10:19 AM
>To: [EMAIL PROTECTED]
>Subject: RE: "forcing" a logging call
>
>
>Howdy,
>I meant getClass().getName() as the first arg, not just getClass() ;)
>
>Yoav Shapira
>Millennium ChemInformatics
>
>
>>-----Original Message-----
>>From: Shapira, Yoav
>>Sent: Tuesday, February 04, 2003 10:18 AM
>>To: 'Log4J Users List'
>>Subject: RE: "forcing" a logging call
>>
>>Hi,
>>Why not just use
>>logger.forcedLog(getClass(), Level.INFO, message, null);
>>
>>That way you keep using the standard log4j distribution, without extending
>>or those ugly casts to your own logger.
>>
>>Yoav Shapira
>>Millennium ChemInformatics
>>
>>
>>>-----Original Message-----
>>>From: Lutz Michael [mailto:[EMAIL PROTECTED]]
>>>Sent: Tuesday, February 04, 2003 9:56 AM
>>>To: 'Log4J Users List'
>>>Subject: RE: "forcing" a logging call
>>>
>>>
>>>
>>>Ceki,
>>>
>>>You rock!  That worked.
>>>
>>>So, basically what we did was:
>>>
>>>1) Extend Logger, because we needed to add a public "force(Object
>>message)"
>>>routine to call "callAppenders" directly.
>>>2) Extend LoggerFactory, to return our own Logger.
>>>3) We then casted the Logger returned by the Factory to our own extended
>>>Logger type.  We needed to do this because the base Logger doesn't know
>>>about our new "force" method.
>>>
>>>Does this sound correct to you, or is this over-complicated?
>>>
>>>Thanks again for your help!
>>>
>>>Mike
>>>
>>>
>>>-----Original Message-----
>>>From: Ceki Gülcü [mailto:[EMAIL PROTECTED]]
>>>Sent: Tuesday, February 04, 2003 4:09 AM
>>>To: Log4J Users List
>>>Subject: Re: "forcing" a logging call
>>>
>>>
>>>Mike,
>>>
>>>See the Category.forcedLog and and Category.callAppenders methods. Have a
>>>look at the source code as well.
>>>
>>>At 00:10 04.02.2003 -0500, Lutz Michael wrote:
>>>
>>>
>>>>Is there a way to force a logging call to go through, regardless of what
>>>>level is set?
>>>>If I have to extend classes to achieve this, I'll do it.
>>>>I'm having trouble finding a way to do this.
>>>>
>>>>Thanks in advance.
>>>>
>>>>Mike
>>>>
>>>>------------------------------------------------------------------------
>-
>>-
>>>-
>>>----
>>>>This message and any included attachments are from Siemens Medical
>>>Solutions
>>>>Health Services Corporation and are intended only for the addressee(s).
>>>>The information contained herein may include trade secrets or privileged
>>>or
>>>>otherwise confidential information.  Unauthorized review, forwarding,
>>>>printing,
>>>>copying, distributing, or using such information is strictly prohibited
>>>>and may
>>>>be unlawful.  If you received this message in error, or have reason to
>>>>believe
>>>>you are not authorized to receive it, please promptly delete this
>message
>>>and
>>>>notify the sender by e-mail with a copy to [EMAIL PROTECTED]  Thank you
>>>>
>>>>---------------------------------------------------------------------
>>>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>>>For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>--
>>>Ceki
>>>
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>>For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>-------------------------------------------------------------------------
>-
>>-
>>>----
>>>This message and any included attachments are from Siemens Medical
>>>Solutions
>>>Health Services Corporation and are intended only for the addressee(s).
>>>The information contained herein may include trade secrets or privileged
>>or
>>>otherwise confidential information.  Unauthorized review, forwarding,
>>>printing,
>>>copying, distributing, or using such information is strictly prohibited
>>and
>>>may
>>>be unlawful.  If you received this message in error, or have reason to
>>>believe
>>>you are not authorized to receive it, please promptly delete this message
>>>and
>>>notify the sender by e-mail with a copy to [EMAIL PROTECTED]  Thank you
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>>For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>---------------------------------------------------------------------------
>----
>This message and any included attachments are from Siemens Medical
>Solutions
>Health Services Corporation and are intended only for the addressee(s).
>The information contained herein may include trade secrets or privileged or
>otherwise confidential information.  Unauthorized review, forwarding,
>printing,
>copying, distributing, or using such information is strictly prohibited and
>may
>be unlawful.  If you received this message in error, or have reason to
>believe
>you are not authorized to receive it, please promptly delete this message
>and
>notify the sender by e-mail with a copy to [EMAIL PROTECTED]  Thank you
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to