Howdy,
Or you could let the logging configuration lie with the system
administrator or application deployer, where it should, and specify your
desired behavior in your documentation.

Yoav Shapira
Millennium ChemInformatics


>-----Original Message-----
>From: Elias Ross [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, January 28, 2004 1:59 AM
>To: Log4J Developers List
>Subject: Re: methods to always log, regardless of the current priority
>
>
>On Tue, 2004-01-27 at 18:43, Sheward, Barry wrote:
>> Hi,
>>
>> We use Log4J extensively and find that sometimes we always want to
log a
>message,
>> but the message is simply for informational purposes. Using
>> Logger/Category.fatal() would potentially frighten users,
>
>You could use a custom Level which has a "value" higher than FATAL but
>is labeled as "INFO" or whatever.
>
>public interface CustomLevel
>{
>  int ALWAYS_INT = Level.ALL_INT;
>
>  Level ALWAYS = new Level(ALWAYS_INT, "INFO", 7);
>}
>
>Logger.log(CustomLevel.ALWAYS, "message");
>
>
>I'm surprised this pattern isn't used more often...
>
>You might find better names than "ALWAYS".  Of course, if the category
>itself is totally off then this might not work.  (This probably would
be
>the better pattern anyway.)
>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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

Reply via email to