2

I am using logj4 in a spring mvc application. I am working on in my logs on a tomcat 6 server and I am getting the following messages:

log4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader).
log4j:WARN Please initialize the log4j system properly.

in the stdout files on the tom cat server. I want to be able to see messages while i access methods and objects. This is how i am using log4j:

class ...

private final Logger logger = Logger.getLogger(getClass()); 

logger.info("My message here");

For some reason i am not seeing any messages in my logs and i am seeing the above warnings

Krishna
  • 484
  • 7
  • 22
devdar
  • 5,564
  • 28
  • 100
  • 153

1 Answers1

2

Sounds like you have not set up logging for your application properly yet.

Try looking at the first few results of a Google search for you error Particularly questions about setting up web.xml.

Community
  • 1
  • 1
Robert Mark Bram
  • 8,104
  • 8
  • 52
  • 73
  • This works for my stdout but why am i not seeing my custom messages in my code showing up in any of the logs? – devdar Aug 15 '12 at 00:10
  • ok sorry i am now seeing them just alot of information came up my messages are in between – devdar Aug 15 '12 at 00:12