Results 1 to 2 of 2

Thread: How do I set the warning logger on AbstractHandlerExceptionResolver?

  1. #1
    Join Date
    Jan 2008
    Posts
    3

    Default How do I set the warning logger on AbstractHandlerExceptionResolver?

    I'm trying to make the resolveException method of AbstractHandlerExceptionResolver log exceptions by adding this to applicationContext-web.xml

    Code:
    	<bean class="org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolver" >
    		<property name="warnLogCategory" value="org.springframework.web"/>
    	</bean>
    but the warnLogger attribute is not being set after the spring context has been initialized.

    What am I doing wrong?
    Last edited by fcalfo; Aug 12th, 2012 at 07:11 PM.

  2. #2
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,695

    Default

    Please use [ code][/code ] tags when posting code. You do nothing wrong and it should be set, also make sure you have at least the level WARN (or lower INFO, DEBUG) set for org.springframework.web else you still aren't going to see anything.

    Also make sure that this is in the applicationcontext loaded by the dispatcherservlet not the ContextLoaderListener.
    Marten Deinum
    Java Consultant / Pragmatist / Open Source Enthousiast / Author


    Pro Spring MVC: With Web Flow
    Conspect

    Have you read the reference guide.
    Use the [ code ] tags, young padawan

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •