Hi
> 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.
I didn't talk about discovering log caller's method. I talked about
automatically Category determining. In such case, user would not have to get
Category before logging.
Instead of Category.getInstance(_My_object_.class.getName()).debug(...) code
would be Log.debug(...).
>
> 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 information.
I think it would be useful to add capability of dumping object. On my last
project I spent a lot of time when discovering properties of objects, used
in my project. By using such code it would be more simple to debug projects.
Adding object's dumper as default renderer for user-defined objects would be
not very efficient. On every new project you would have to change dumped
objects. I think, that it is not convenient.
>
>
> > -----Original Message-----
> > From: Pavel Muhataev [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, July 02, 2001 10:09 AM
> > To: [EMAIL PROTECTED]
> > 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 :
> http://pavlinchik.chat.ru/Java/log4j/Log.java
> >
> >
> > Paul Mykhataew, ICQ # 33733798 << File: ATT00002.txt >>
>
begin 600 winmail.dat
M>)\^(BX(`0:0"``$```````!``$``0>0!@`(````XP0```````#G``$(@`<`
M&````$E032Y-:6-R;W-O9G0@36%I;"Y.;W1E`#$(`06``P`.````T0<'``,`
M#``'`"P``@`C`0$@@`,`#@```-$'!P`#``P`!P`L``(`(P$!"8`!`"$```!%
M.40W-#8Y.$-!-D5$-3$Q.$8V-#`P-C`Y-S=",D(X1``U!P$$@`$`%@```%)%
M.B!,;V<T:B!I;7!R;W9E;65N=`"'!P$-@`0``@````(``@`!`Y`&`+@-```P
M````"P`"``$````#`"X```````(!,0`!````&0$``%!#1$9%0C`Y``$``@!R
M`````````#BANQ`%Y1`:H;L(`"LJ5L(``$5-4TU$0BY$3$P``````````!M5
M^B"J9A'-F\@`J@`OQ%H,````3$U/6$-(,#4`+V\]16YT97)P<FES92]O=3U,
M34\O8VX]4F5C:7!I96YT<R]C;CU*36]O<F4`+@`````````R>8-:OD31$;.N
M``"4>50:`0!AVG+I%&C0$;.;``"4>50:```!37VT````````+@`````````R
M>8-:OD31$;.N``"4>50:`0!AVG+I%&C0$;.;``"4>50:````;OE$```0````
M$0D)+J]NU1&9L@`(QX:9_18```!213H@3&]G-&H@:6UP<F]V96UE;G0`````
M0``Y`-#"7CV7`\$!'@!P``$````2````3&]G-&H@:6UP<F]V96UE;G0````"
M`7$``0```"`````!P0,`;BN81M=K;LH1U8]D`&"7>RN-``4#$Y``']_1(!X`
M,4`!````!P```%!!5D5,30```P`:0``````>`#!``0````<```!0059%3$T`
M``,`&4```````@$)$`$```"Z!P``M@<``,D-``!,6D9UKE`$S@,`"@!R8W!G
M,3(UXC(#0W1E>`5!`0,!]_\*@`*D`^0'$P*`#_,`4`16/PA5![(1)0Y1`P$"
M`&-HX0K`<V5T,@8`!L,1)?8S!$83MS`2+!$S".\)][8[&!\.,#41(@Q@8P!0
M,PL)`60S-A90"Z8@2`\`H`JQ"H0*@#X@,2EP($ET)P0@!T`8(&&09'D@<`-@
M=FD!``1D(!\@82!T:&6$("(7L&-A=&D"(.1);@(0(B`+@`KC';(03&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/(8?42@`P/]`4EO"'79T
M-+K@`V`C`#51MBX>\`N`=%"`8&%4+L#_0Y!']I7,H;&ZY#,C,6`>D?^Q8FOZ
M=#2CK('Q'7:P4BZ!_U=A-S%&\:+&'U%;T<_'I9/_@?H]@QUV:]F[1FN1"8#)
M;_^F5((G:CI]0VK_;`G"A\AB_R9D<!%FDGB<R5^5S;L"3(*_H]-&-$)!'O$)
MP"=@((E!A1V%:`)`<#HO+PJPOG96<1/05+!$<#0!+J^PZB]FDB]?PR]'(I'`
M-0!?W)^5VR?0U^%#T&N*,W=!(^!)0U$@(TG`,X(WYG$Y."`\/(CP8Z6QB4!!
M5%2/0(]`,E8N#-`%0#Z%?GWI@```'@!"$`$````R````/$4W,$%&03=%.3$R
M,T0U,3$Y.4%%,#`P.$,W.#8Y.49$,#DR,D%#0$Q-3UA#2#`U/@````,`WC^O
M;P```P`)60$````#``2`""`&``````#`````````1@````!2A0``)VH!`!X`
M!8`((`8``````,````````!&`````%2%```!````!````#DN,``>``J`""`&
M``````#`````````1@`````VA0```0````$`````````'@`+@`@@!@``````
MP````````$8`````-X4```$````!`````````!X`#(`((`8``````,``````
M``!&`````#B%```!`````0`````````+`$&`""`&``````#`````````1@``
M``""A0```0````L``H`((`8``````,````````!&``````.%`````````P`#
M@`@@!@``````P````````$8`````$(4````````+``^`""`&``````#`````
M````1@`````&A0````````,`!H`((`8``````,````````!&``````&%````
M````"P`'@`@@!@``````P````````$8`````#H4````````#``B`""`&````
M``#`````````1@`````1A0````````,`"8`((`8``````,````````!&````
M`!B%`````````P#Q/PD$```#`/T_XP0```,`)@```````P`V```````#`(`0
M_____P(!1P`!````+@```&,]4E4[83T@.W`]5D1).VP]15A#2$%.1T4M,#$P
M-S`S,#@P-S0T6BTW.#$T-0```!X`.$`!````!P```%!!5D5,30``'@`Y0`$`
M```'````4$%614Q-``!```<P.MM>/9<#P0%```@P"NYQ/9<#P0$>`#T``0``
M``4```!213H@`````!X`'0X!````$@```$QO9S1J(&EM<')O=F5M96YT````
M'@`U$`$```!`````/$(S,#A"-C(V,S!%-40S,3%!1$$S,#`P,#8R03$W1D)"
M,#(P,T(S0D5`97AC:&%N9V4N=F5S="YM<VLN<G4^``L`*0``````"P`C````
M```#``807H#MQ@,`!Q"Y"````P`0$``````#`!$0`P```!X`"!`!````90``
M`$A),2E)5%-!3%)%04194%)/5DE$141624%42$4B3$]#051)3TY)3D9/(DE.
M3$]'1TE.1T5614Y424993U5704Y45$]3145)5"Q54T593U523$%93U544TU%
M04Y31D]21$])3D<``````@%_``$```!`````/$(S,#A"-C(V,S!%-40S,3%!
M1$$S,#`P,#8R03$W1D)",#(P,T(S0D5`97AC:&%N9V4N=F5S="YM<VLN<G4^
#`)K6
`
end
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]