title: lombok log annotation is not working for static methods
body: <p>I am trying to use lombok's @Slf4j annotation. It works fine for non-static methods but I am unable to use them for static ones, e.g.:</p>
  <pre><code>import lombok.extern.slf4j.Slf4j;
  
  @Slf4j
  public class MyClass {
  
      public static void staticMethod() {
          log.info(&quot;&quot;); //build error
          //code
      }
  
      public void nonStaticMethod() {
          log.info(&quot;&quot;); //builds ok
          //code
      }
  </code></pre>
  <p>More specifically the build error is:</p>
  <pre><code>Error:(17, 9) java: non-static variable log cannot be referenced from a static context
  </code></pre>
  <p>So either I am missing something or this simply is not the way to do it, but what is causing me some confusion is that <a href="https://stackoverflow.com/a/43902039/4828060">other answers</a> seem to indicate that this usage is the correct one. Does anyone know what am I doing wrong? Thank you for your help.</p>