logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shorn Tolley <shorntol...@yahoo.co.uk>
Subject Implementing auditing in log4j, was: Formal parameter ideas?
Date Wed, 16 Oct 2002 07:12:01 GMT
We are soon to be doing almost exactly that kind of
thing on our project, for the purposes of auditing.

We would like to use custom "AuditObjects" and log4j
as the audit trail API.  For the implementation of the
recording of the audting, we'd have custom
"AuditObject" log4j renders and an Asynchronous
appender linked to a JDBCAppender to write the audit
trail into the database.

I'd be interested in hearing if anyone can state if
this is maybe a really bad idea for some reason??

I also am a bit worried about the overhead of creating
a short-lived "AuditObject" each time something that
needs to be audited occurs (potentially a lot).

Does anyone have any input on this subject?

Cheers,
Shorn.


 --- Rick LaBanca <rick.labanca@studentuniverse.com>
wrote: > Yes that's what I was thinking of doing also.
But
> then I think, why no go
> the extra step and have the parameter class wrap the
> correct logger. I think
> I am leaning that way. Plus I'm performance paranoid
> for some of the logs,
> want to just reuse objects as much as I can.
> 
> ----- Original Message -----
> From: "Shorn Tolley" <shorntolley@yahoo.co.uk>
> To: "Log4J Users List"
> <log4j-user@jakarta.apache.org>
> Sent: Monday, October 14, 2002 9:33 PM
> Subject: Re: Formal parameter ideas?
> 
> 
> > What about encapsulating your formal parameters in
> a
> > single object, then having a log4j object renderer
> to
> > format that object?
> >
> > Something like this:
> > FormalParams fp =
> >   new FormalParams("johndoe","14.95","software");
> > mycartlog.info(fp);
> >
> > Doesn't stop people from logging whatever they
> want,
> > but when they want to specifically log a set of
> > "Formal Parameters", as long as they use the
> > FormalParams class, they can't mess it up. 
> (becuase
> > it's the object renderer that does the formatting,
> not
> > the caller).
> >
> > Just a thought.
> >
> > Cheers,
> > Shorn.
> >
> >
> >  --- "LaBanca, Rick"
> > <rick.labanca@studentuniverse.com> wrote: >
> > > I want to impose some formal parameters on
> logging.
> > > By that I mean,
> > > mycartlog.info("johndoe","14.95","software");
> etc,
> > > and stamp that into the
> > > log in a known (and more parseable) format.
> > >
> > > I wish to reduce the risk of someone making a
> logger
> > > and not formatting
> > > correctly so this idea came up. I could wrap
> > > loggers, and make these
> > > methods. Or I could make helpers that take
> > > parameters and string 'em up, but
> > > there is a chance there that the wrong helper
> could
> > > be used for the wrong
> > > log instance. Confused yet?
> > >
> > > Perhaps I am trying to be too safe... Anyone do
> > > something similar?
> > >
> > > Rick
> > >
> > > --
> > > To unsubscribe, e-mail:
> > >
> <mailto:log4j-user-unsubscribe@jakarta.apache.org>
> > > For additional commands, e-mail:
> > > <mailto:log4j-user-help@jakarta.apache.org>
> > >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Everything you'll ever need on one web page
> > from News and Sport to Email and Music Charts
> > http://uk.my.yahoo.com
> >
> > --
> > To unsubscribe, e-mail:
> <mailto:log4j-user-unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail:
> <mailto:log4j-user-help@jakarta.apache.org>
> 
> 
> --
> To unsubscribe, e-mail:  
> <mailto:log4j-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:log4j-user-help@jakarta.apache.org>
>  

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

--
To unsubscribe, e-mail:   <mailto:log4j-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:log4j-user-help@jakarta.apache.org>


Mime
View raw message