title: How do I get google guice to inject a custom logger, say a commons-logging or log4j logger
body: <p>Google guice has a <a href="http://code.google.com/p/google-guice/wiki/BuiltInBindings#Loggers" rel="nofollow noreferrer">built-in logger binding</a>. But what if I want to use a commons-logging or log4j logger?</p>
  
  <p>Can I get guice to inject a Log created by</p>
  
  <pre><code>LogFactory.getLog(CLASS.class)
  </code></pre>
  
  <p>But having the same behavior as in built-in binding:</p>
  
  <blockquote>
    <p>The binding automatically sets the logger's name to the name of the class into which the Logger is being injected.. </p>
  </blockquote>
  
  <hr>
  
  <p>Does it even makes sense? Or shout I simply use the built-in java Logger? Or just use commons-logging without injections?</p>