My application is using Spring
to handle the interaction with database (Sql Server
)
And commons-logging-1.1.1.jar
, log4j-1.2.17.jar
, slf4j-api-1.6.3.jar
and slf4j-log4j12-1.7.6.jar
are put into build path for the logging framework of the application.
The last two logging jar (slf4j-api
and slf4j-log4j12
) are for another component inside the application to use log4j
.
Here is my questions:
When
Spring-Jdbc
runtime excecption happens, the exception is only showed in the console of eclipse with the font color red. The exception is NOT logged into the log file. But the normal log (likelog.info(...)
) are all in the log file. Why can't the run-time exception be in the log file and how to solve this problem.When I use
SimpleJdbcCall
to call the stored procedure with parameters inMapSqlParameterSource
, the following log shows up:
14:43:30 [INFO ] Added default SqlReturnUpdateCount parameter named #update-count-1
14:43:30 [INFO ] Added default SqlReturnUpdateCount parameter named #update-count-1 ......
It's really annoying because the number of this message is so large. I want to turn off this particular log message without affecting another logging with the same level (INFO
)
And my log4j.xml is fine I think because the logging are basically fine except the above issues.