I have Spring MVC setup to log exceptions using commons logging, but find that some runtime exceptions aren’t being logged.
Here’s my bean configuration for the default exception resolver provided by spring:
<bean class="org.springframework.web.servlet.handler.SimpleMappingExceptionResolver">
<property name="exceptionMappings">
<props>
<prop key="java.lang.Exception">error</prop>
</props>
</property>
</bean>
To get this to log most exceptions, I had to add the following line to my config:
So ultimately it became the following:
warnLogCategory is described in detail here.