title: Dynamically logging in spring framework
body: <p>Currently I'm having a spring boot application and for each class like <code>SampleClass</code> that I would like to have a log I need to initialize the logger like this:</p>
  
  <pre><code>private static Logger log = LoggerFactory.getLogger(SampleClass.class);
  </code></pre>
  
  <p>Which means that we need statically send the classname to the <code>getLogger</code> method.
  I was thinking of creating a loggable interface and everytime a class implements this interface, it dynamically finds the class name and properly write the log to the outputstream with proper classname. 
  I googled to find a proper solution but every example is specifically sending the classname in the compile time. Does spring have this ability? </p>