Peter,
Thanks for making use of the code.
I'd like to test it, but I'm not sure how you envisage it's use. My
original code adapted LogEvent to give ready access to the information
from an adapted PatternFormatter. If I'm going to test it, its seems to
be sensible to build some code that fits your design plans.
Stuart.
On Thursday, July 26, 2001, at 04:11 pm, Peter Donald wrote:
> Hi,
>
> I refactored part of your code into
>
> org.apache.log.util.StackIntrospector.getCallerMethod(Class clazz);
>
> and to make it work like old version you would go
>
> StackIntrospector.getCallerMethod( Logger.class );
>
> Could you check I didn't stuff anything up and make sure my comments make
> sense ? ;)
>
> TIA
>
> On Wed, 25 Jul 2001 00:41, Stuart Roebuck wrote:
>> This is probably quite expense on resources during use, but it does what
>> I'
>> d originally wanted and produces info on the method called.
>>
>> [%{method}]
>>
>> could result in, for example:
>>
>> [com.adolos.taskmanager.TaskBin.createHashMapKey(TaskBin.java:142)]
>>
>> Stuart.
>>
>> <Attachment missing>
>>
>> On Tuesday, July 24, 2001, at 02:32 pm, Stuart Roebuck wrote:
>>> Apologies,
>>>
>>> My last patch is based on a misinterpretation of the original code.
>>> This
>>> doesn't give the method from which the LogEvent was called: only the
>>> Class.
>>> It's still useful, but the names of my methods and the field are
>>> inappropriate.
>>>
>>> Stuart.
>>>
>>> On Tuesday, July 24, 2001, at 02:02 pm, Stuart Roebuck wrote:
>>>> I've just added in a 'method' field for PatternFormatter based on the
>>>> code added to Cocoon today by Sylvain Wallez. It adds the facility to
>>>> display the complete path of the calling method in the log, e.g.:
>>>>
>>>> (%{method})
>>>>
>>>> could result in:
>>>>
>>>> (com.adolos.MyStuff.myMethod)
>>>>
>>>> I've tried to make the changes so that there is no additional overhead
>>>> if this field is not displayed.
>>>>
>>>> It works for me!
>>
>> -------------------------------------------------------------------------
>> Stuart Roebuck [EMAIL PROTECTED]
>> Lead Developer Java, XML, MacOS X, XP, etc.
>> ADOLOS <http://www.adolos.com/
>> >
>
> ----------------------------------------
> Content-Type: text/plain; charset="us-ascii"; name="Attachment: 1"
> Content-Transfer-Encoding: 7bit
> Content-Description:
> ----------------------------------------
>
> ----------------------------------------
> Content-Type: application/octet-stream; charset="us-ascii";
> name="changes.patch"
> Content-Transfer-Encoding: quoted-printable
> Content-Description:
> ----------------------------------------
>
> ----------------------------------------
> Content-Type: text/plain; charset="us-ascii"; name="Attachment: 3"
> Content-Transfer-Encoding: 7bit
> Content-Description:
> ----------------------------------------
>
> --
> Cheers,
>
> Pete
>
> *-----------------------------------------------------*
> | "Faced with the choice between changing one's mind, |
> | and proving that there is no need to do so - almost |
> | everyone gets busy on the proof." |
> | - John Kenneth Galbraith |
> *-----------------------------------------------------*
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
-------------------------------------------------------------------------
Stuart Roebuck [EMAIL PROTECTED]
Lead Developer Java, XML, MacOS X, XP, etc.
ADOLOS <http://www.adolos.com/>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]