title: How to Log in Spring?
body: <p>I've never been using logging, so I'm pretty ignorant about it. Anyway I've a Spring controller and I thought that it was as easy as adding this to the controller's class:</p>
  
  <pre><code>private Logger logger = LoggerFactory.getLogger(this.getClass());
  </code></pre>
  
  <p>where logger is org.slf4j.Logger and to log use:</p>
  
  <pre><code>logger.info("mainpage");
  </code></pre>
  
  <p>but nothing appears on the eclipse console. How do I do it?</p>
  
  <p>I didn't configure log4j or anything.</p>