Thanks. The callAppenders method does not jump out like the forcedLog method does when looking for a way to always log, but now the two methods are associated in the archives so it's all good.

Since I wrote my response, I've implemented an "Always Log" use case by extending the Level class:

public class MyLevels extends Level {
static final Level STATUS = new MyLevels(Priority.FATAL_INT + 10, "STATUS", SyslogAppender.LOG_LOCAL0);


        private MyLevels(int level, String name, int sysLogLevel) {
            super(level, name, sysLogLevel);
        }
    }


On Apr 18, 2005, at 10:01 PM, Lutz Michael wrote:

That can still be achieved via wrapping.  See "callAppenders" API on
Category (which Logger subclasses)

Ceki is very clear in his book to NOT extend Log4j.  Here's a summary:
http://logging.apache.org/log4j/docs/TROUBLESHOOT.html#cce

I have learned the hard way too -- you should wrap not extend Logger.

I have not seen a valid reason to extend.


-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, April 18, 2005 8:43 PM To: log4j-user@logging.apache.org Cc: Log4J Users List Subject: Re: Extend or Wrap


There is a reason to Extend. If you want to use the forcedLog method to force the logging of a message without identifying it as "FATAL".

I have such a use case in a project on which I'm working.


On Mar 1, 2005, at 5:18 PM, Harper, Allen ((AHARPER)) wrote:

* Replies will be sent through Spamex to log4j-user@logging.apache.org
* For additional info click -> http://www.spamex.com/i/?v=3D3863091

Never mind, I may have found it.
Al


-----Original Message----- From: Lutz Michael [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 01, 2005 4:13 PM To: 'Log4J Users List' Subject: RE: Extend or Wrap


wrap.

Ceki is very clear about this in his book.


-----Original Message----- From: Harper, Allen (AHARPER) [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 01, 2005 5:04 PM To: Log4J Users List Subject: Extend or Wrap


So, whats everone recommendations as to whether you should wrap, or extend Logger?

Whats the pros and cons?

Al Harper

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

---------------------------------------------------------------------- -
-
-------
This message and any included attachments are from Siemens Medical
Solutions USA, Inc. 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]




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

----------------------------------------------------------------------- --------
This message and any included attachments are from Siemens Medical Solutions
USA, Inc. 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