commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Gilliland" <dgillilan...@users.sourceforge.net>
Subject RE: Proposal for the Commons Sandbox
Date Mon, 08 Mar 2004 16:43:46 GMT
I originally considered implementing Jestr as a Log4J object renderer, but decided against
it because (a) I didn't want it to depend on Log4J, and more importantly (b) stringification
and logging are logically distinct activities and there are some very good reasons for stringifying
objects that are totally disconnected from logging.

Once you have a stringified representation, you may do any number of different things with
it.  One of those things is to send it to the logger.  Another might be to stuff it into your
Struts form to be included by a JSP implementing some sort of monitoring console.  In fact,
at a previous job I implemented just such a console that would let you request a particular
business object via a special URL syntax, and have that object's string representation displayed
in your Web browser.  So for example if customer "sally" is experiencing strange behavior,
you can log in to the console and view her Customer instance along with all its dependent
objects like accounts, profiles, etc, to see if something looks amiss.

---------- Original Message ----------------------------------
From: "Shapira, Yoav" <Yoav.Shapira@mpi.com>
Reply-To: "Jakarta Commons Developers List" <commons-dev@jakarta.apache.org>
Date:  Mon, 8 Mar 2004 10:17:45 -0500

>
>Hi,
>
>>Good point, and that occurred to me as well.  However I think Jestr is
>a
>>little different from the ToStringBuilder stuff because it isn't
>>necessarily concerned with helping you implement toString() methods;
>>instead, it's more concerned with helping you log *arbitrary* objects,
>even
>>if you don't have access to their source code to change their
>toString()
>>methods.
>
>What I'd like is an implementation of log4j's ObjectRenderer
>(org.apache.log4j.or.ObjectRenderer) that uses reflection like
>commons-lang reflectionToStringBuilfer.  This wouldn't be difficult to
>write, I imagine.  I wouldn't want a whole new package or dependency for
>this.  Log4j isn't going to add commons-lang as a dependency either.
>
>Hmm... ;)
>
>Yoav Shapira
>
>
>
>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: commons-dev-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: commons-dev-help@jakarta.apache.org
>
>

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


Mime
View raw message