avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mircea Toma" <mirceat...@home.com>
Subject Re: LogTarget factories
Date Sat, 01 Sep 2001 20:33:57 GMT
Ok, I think I got it!

A TextMessageBuilder will be able to send LogEvent 'attributes' formatted or
not formatted to a JMS destination. If formatted the JMS message will
contain the LogEvent message plus maybe some formatted LogEvent 'attributes'
(like the stacktrace). If not formatted the properties can be used to do a
server-side select based on their values or filtered by a LogTarget.

Mircea


----- Original Message -----
From: "Mircea Toma" <mirceatoma@home.com>
To: "Avalon Development" <avalon-dev@jakarta.apache.org>
Sent: Saturday, September 01, 2001 2:16 PM
Subject: Re: LogTarget factories


>
> ----- Original Message -----
> From: "Peter Donald" <donaldp@apache.org>
> To: "Avalon Development" <avalon-dev@jakarta.apache.org>
> 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: avalon-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: avalon-dev-help@jakarta.apache.org
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: avalon-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: avalon-dev-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: avalon-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: avalon-dev-help@jakarta.apache.org


Mime
View raw message