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" <[EMAIL PROTECTED]>
To: "Log4J Users List" <[EMAIL PROTECTED]>
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"
> <[EMAIL PROTECTED]> 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:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> >
>
> __________________________________________________
> 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:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>


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

Reply via email to