I use standard log4J settings. This example is from a log4j.properties file
but log4j.xml will work as well. This outputs to the console and since I
usually use Eclipse it is very convenient as the output goes right to the
console view. The ConversionPattern is usually on one line but it wrapped
when I pasted it into this message.

log4j.appender.stdout=org.apache.log4j.ConsoleAppender

log4j.appender.stdout.Target=System.out

log4j.appender.stdout.layout=org.apache.log4j.PatternLayout

log4j.appender.stdout.layout.ConversionPattern=%d{<MMM d, yyyy h:mm:s a z>}
[%x] %5p %c{2}:%L - %m%n

log4j.logger.com.opensymphony=debug, stdout

This will give you quite a bit more than just OGNL. You could change the
above line to this

log4j.logger.com.opensymphony.xwork2.util=debug, stdout

To narrow it down.

Regards,
Randy Burgess
Sr. Web Applications Developer
Nuvox Communications



> From: <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <user@struts.apache.org>
> Date: Tue, 5 Feb 2008 15:38:12 -0500
> To: Struts Users Mailing List <user@struts.apache.org>
> Subject: Re: Custom OGNL PropertyAccessor
> 
> you can configure the xwork LoggingInterceptor into your <default> stack..
> <interceptor name="logger"
> class="com.opensymphony.xwork2.interceptor.LoggingInterceptor"/>
> 
> looking for clues on OGNL logging???
> Anyone?
> 
> HTH
> Martin
> ----- Original Message -----
> Wrom: QBGJSNBOHMKHJYFMYXOEAIJJPHSCRTNHGSWZIDREXCA
> To: "Struts Users Mailing List" <user@struts.apache.org>
> Sent: Tuesday, February 05, 2008 3:05 PM
> Subject: Re: Custom OGNL PropertyAccessor
> 
> 
>> No I haven't.  How do I go about doing that?
>> 
>> Dave Newton wrote:
>>> --- Tommy Becker <[EMAIL PROTECTED]> wrote:
>>> 
>>>> If there were a better description, I'd be happy to give it.  As far as
>>>> I can tell, our custom PropertyAccessor is not being used.  What we
> want
>>>> is to be able to say "property" in an OGNL expression and have it call
>>>> getPropertyValue("property"), not getProperty().  It seems it's
>>>> continuing to try getProperty() despite our attempt at registering a
>>>> custom PropertyAccessor.
>>>> 
>>> 
>>> Have you turned up OGNL and XWork logging?
>>> 
>>> Dave
>>> 
>>> 
>>>> Laurie Harper wrote:
>>>> 
>>>>> Tommy Becker wrote:
>>>>> 
>>>>>> I have a question about using OGNL PropertyAccessors.  We have an
>>>>>> object on the value stack that we expose to JSP pages that does not
>>>>>> have standard JavaBeans getter/setter methods.  From what I can tell,
>>>>>> this leaves us 2 options.  We can either call the getter methods
>>>>>> explicitly via OGNL method calls in the pages, or we can wrap the
>>>>>> object in a JavaBean-like object.  The second option is unworkable in
>>>>>> all but the simplest of cases when you realize that the method calls
>>>>>> can themselves return another object that needs to be wrapped, or
>>>>>> even a collection of them.  So we've been using method calls in the
>>>>>> pages (yeah I know).
>>>>>> 
>>>>>> Reading through the OGNL docs, it seems that what we need is a
>>>>>> PropertyAccessor that knows how to operate on our object.  So we
>>>>>> implemented one, and attempted to register it by placing this in our
>>>>>> struts.xml:
>>>>>> 
>>>>>> <bean type="ognl.PropertyAccessor" name="class.we.need.access.to"
>>>>>> class="our.property.accessor.PropertyAccessor"/>
>>>>>> 
>>>>>> Unfortunately it doesn't work.  Can someone tell me what we're doing
>>>>>> wrong, or even if what we're trying to do is possible?  Thanks!
>>>>>> 
>>>>> I don't know anything about OGNL's PropertyAccessor, but I doubt
>>>>> anyone can offer much help without seeing the code and a better
>>>>> description of the failure than "it doesn't work."
>>>>> 
>>>>> L.
>>>>> 
>>>>> 
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>>> 
>>>>> 
>>>> NOTICE: This e-mail message is for the sole use of the intended
>>>> recipient(s) and may contain confidential and privileged information of
>>>> Motricity.  Any unauthorized review, use, disclosure or distribution is
>>>> prohibited.  If you are not the intended recipient, please contact the
>>>> sender by reply e-mail and destroy all copies of the original message.
>>>> 
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>> 
>>>> 
>>>> 
>>> 
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>> 
>>> 
>> 
>> NOTICE: This e-mail message is for the sole use of the intended
> recipient(s) and may contain confidential and privileged information of
> Motricity.  Any unauthorized review, use, disclosure or distribution is
> prohibited.  If you are not the intended recipient, please contact the
> sender by reply e-mail and destroy all copies of the original message.
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>> 
>> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 



This email and any attachments ("Message") may contain legally privileged 
and/or confidential information.  If you are not the addressee, or if this 
Message has been addressed to you in error, you are not authorized to read, 
copy, or distribute it, and we ask that you please delete it (including all 
copies) and notify the sender by return email.  Delivery of this Message to any 
person other than the intended recipient(s) shall not be deemed a waiver of 
confidentiality and/or a privilege.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to