----- Original Message -----
From: "Peter Donald" <[EMAIL PROTECTED]>
To: "Avalon Development" <[email protected]>
Sent: Saturday, September 01, 2001 6:18 AM
Subject: Re: LogTarget factories
> On Fri, 31 Aug 2001 13:52, Mircea Toma wrote:
> > Hi,
> >
> > Here is the TextMessageBuilder changed accordingly to our discussion.
> > I also created a FormattedTextMessageBuilder to replace the
> > XMLMessageBuilder, the type of Formatter is passed in the contructor.
> >
> > ..... and, yes I finished the JMSQueueTarget that should be used in the
> > JMSTargetFactory (one factory per media).
>
> Looks good. I committed it as-is but theres a few things I am not sure
about.
> Is there a need for ContentInfo ?
It's there to map any LogEvent attribute to the message body not only
'logEvent.getMessage()' attribute (let's say I want to send messages that
will contain only the stacktrace in the body and the category as property).
I guess you will say that's FS! ;)
> I couldn't see any real-life reason for it
> to be honest.
To tell you the truth, I was strugling with that too but the reason why I
did it like that you have it above.
> Removing it would decrease complexity I think.
Yes! ... I can change it any time!
>
> For the odd cases that may need that style functionality we could instead
> replace it with a Formatter. Thus we would have something like
>
> protected String getText( LogEvent event )
> {
> if( null != m_formatter )
> {
> m_formatter.format( event );
> }
> else
> {
> return event.getMessage();
> }
> }
>
> In theory we could also replace FormattedTextMessageBuilder with extra
> constructor that sets m_properties = new PropertyInfo[ 0 ];
.... and send the same information twice (like category, priority..), once
in the formatted text and secondly in a message property?!
Mircea
>
> Thoughts??
>
> --
> Cheers,
>
> Pete
>
> ---------------------------------------------------------------
> The difference between genius, and stupidity? Genius has limits
> ---------------------------------------------------------------
>
>
> ---------------------------------------------------------------------
> 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]