logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Moore <jim.mo...@veritas.com>
Subject RE: Log4j improvement
Date Mon, 02 Jul 2001 16:44:01 GMT
1) It's already provided via the "locationInfo" in LoggingEvent.  If you
want to see it, use your layout's means for doing so.  (For example,
PatternLayout will show everything you mentioned and more.)  It's usually
not used because it dramiticly slows things down, but if you've got the
speed to spare and want that info, it's available for you.

2) I'm afraid I don't do anything with ResourceBundles, so I can't

3) Usually, the default render for objects is sufficient since most objects
provide a reasonable toString() method.  However, if you want something
fancier (like in the code you linked to) you can override the default
behavior for various types of objects by providing your own ObjectRenders
(in the org.apache.log4j.or package) and registering them with the
RendererMap (available from the Hierarchy).  See the JavaDocs for more

-Jim Moore

>  -----Original Message-----
> From: 	Pavel Muhataev [mailto:PavelM@moscow.vestedev.com] 
> Sent:	Monday, July 02, 2001 10:09 AM
> To:	log4j-dev@jakarta.apache.org
> Subject:	Log4j improvement
> Hi all
> I'd like to suggest three features to log4j project:
> 1) Automatically category determining by package, class and method name
> 2) Capability of configuration ResourceBundle in configuration file
> 3) Object dumping capability.
> Explanations:
> 1) Log4j have capability of automatically configuration loading at
run-time. But we need to get category object before logging. Adding
capability of automatically category determining would make log4j more
easily to use.
> There must be some universal class with static methods for logging.
(debug, info, etc.) When calling this methods package, class and method name
must be determined (may be by using Throwable.printStackTrace).
> 2) There are a great capability of using ResourceBundles. But it can't be
configured by configure files. I think, such capability must be added
> 3) I think, it would be very useful to add capability of printing some
Java object's dump.
> Here is source code of program :
> Paul Mykhataew, ICQ # 33733798 << File: ATT00002.txt >> 

View raw message