Hi,
You could use a normal JDBCLogger, pass it a Map (or other Collection of
your choice) that contains the subject, principal, and a message, and
write an ObjectRenderer that can render those classes.  That way you
don't need a custom logger or a custom appender.

Yoav Shapira
Millennium Research Informatics


>-----Original Message-----
>From: Seaman, Sloan [mailto:[EMAIL PROTECTED]
>Sent: Friday, September 03, 2004 8:13 AM
>To: '[EMAIL PROTECTED]'
>Subject: New logging method
>
>I'm trying to figure out the best way to implement an audit system for
my
>companies apps and I was thinking about using Log4j's framework but I'm
not
>sure of the best way of doing it.
>
>I need to be able to do something like:
>log.audit(javax.security.auth.Subject subject, Class principalClass,
String
>msg);
>
>So I was thinking I would have to create my own Logger, such as:
>AuditLogger log  = AuditLogger.getLogger(classname);
>
>And then use the JDBC Appender to write the audit information to the
>database.
>
>Now, I figure I have to create a new new patternlayout character (such
as
>%s
>for subject) so that I can use all the different appenders easily...
>
>But I'm curious about the best way to get the log.audit() to work with
the
>existing framework.
>
>Can anyone point me in the right direction?  Should I do it this way or
do
>something like:
>log.setSubject();
>log.setPrincipalClass();
>log.debug(msg); // have different audit levels...
>
>Thanks!
>--
>Sloan
>




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