Hi, 

   I am new to log4j and have a few questions. I am designing a "next
generation" system based off of our current system. The system needs to log
events, as well as send an alarm to our operations people depending on the
specified event, as well as some other factors.

   We currently define events in "categories" where a hierarchy exists
(EV_EVENT is root, EV_ERROR, EV_TRACE, EV_STATISTIC are children). Under the
children, there are many other events. We use text files to configure the
priorities as well as the hierarchy. A text configuration file also
specifies if the event is an alarm, if an event is overloaded, another text
configuration file is used to determine if the specific event is an alarm
(based on text in the message, time occurred, if X occur in Y time, etc).
These are all configured through text files to be able to modify the events
and alarms without needing to recompile code.

   Although we do not need to follow this model specifically, I am trying to
determine how to use the logging categories to get to a finer level of
granularity. For example, under EV_EVENT the following events are defined:
EV_APP_ERROR, EV_APP_ERROR_BO, EV_APP_ERROR_USER (these from the same module
-- call it "foo"). Currently, we have the ability to set a priority to each
of these individually through the config file, so EV_APP_ERROR and
EV_APP_ERROR_BO could be a WARN, but EV_APP_ERROR_USER could be an INFO. The
second config file is used to determine if the event is also an alarm. So,
EV_APP_ERROR could be an alarm and EV_APP_ERROR_BO could be an alarm if it
occurs x times in y minutes, but EV_APP_ERROR_USER is not an alarm at all. 

   From what I can understand from log4j, I can retrieve a logger for the
class "foo". But can I create generic categories, like EV_APP_ERROR and
EV_APP_ERROR_USER? If so, then the appender configuration can be modified
for the priority for each different category, right?

   Also, is it possible to read the config file to determine if the event is
also an alarm? I can see there is an "evaluator" method in the SMTPAppender,
so would I need to create a new appender class from the AppenderSkeleton
class to accomplish this? 

Thank you in advance, 

Collette
========================
Collette Matthias                    
Fidelity Investments                     
[EMAIL PROTECTED]                  


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

Reply via email to