views:

15

answers:

1

Hi there,

I need to log whether the Spring context was initialized correctly in a log file. If all the beans were wired and loaded correctly, I need to log that, as well as an incorrect initialization...

I have created the appender and the log file, but the problem is that I don't know if there is something in Spring to log those two events and how can I do it.

Thanks G.

A: 

Finally managed to do this. Added a logger in my log4j.properties for the ContextLoader class, with a level of ERROR. Then attached my new appender to that logger and this way I get all context loading errors in my new log file.

Thanks G.

GGL