title: Unable to access logger: "cannot resolve symbol (info|warning|debug)"
body: <p>I'm implementing SLF4J with logback into my Java project, which I thought was a breeze. It should've been a breeze. It wasn't.</p>
  
  <p>My dilemma is this: IntelliJ doesn't recognise that the logger object I'm creating exists and won't build because of that error. Here's the code below.</p>
  
  <pre><code>import org.slf4j.Logger;
  import org.slf4j.LoggerFactory;
  
  public class Main {
      public static final Logger logger = LoggerFactory.getLogger(Main.class);
  
      // Will replace with config values
      private static final String token  = "bottoken";
      private static final String prefix = "!";
  
      logger.info("This info to the left is red");
  }
  </code></pre>
  
  <p>I've tried invalidating the cache as suggested by many and deleting the IntelliJ filesystem, but to no avail. It even got to the point where the whole project was deleted then recreated in a different folder. Nothing.</p>
  
  <p>The show up in my libraries list in the Project Settings and reloading Maven project doesn't help either.</p>
  
  <p>I've added SLF4J through Maven as shown in the pom.xml below:</p>
  
  <pre><code>&lt;dependencies&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
          &lt;artifactId&gt;slf4j-api&lt;/artifactId&gt;
          &lt;version&gt;1.7.22&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
          &lt;artifactId&gt;slf4j-simple&lt;/artifactId&gt;
          &lt;version&gt;1.7.22&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;ch.qos.logback&lt;/groupId&gt;
          &lt;artifactId&gt;logback-classic&lt;/artifactId&gt;
          &lt;version&gt;1.1.8&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;ch.qos.logback&lt;/groupId&gt;
          &lt;artifactId&gt;logback-core&lt;/artifactId&gt;
          &lt;version&gt;1.1.8&lt;/version&gt;
      &lt;/dependency&gt;
  &lt;/dependencies&gt;
  </code></pre>
  
  <p>It all checks out in the listed libraries and all other dependencies (that aren't listed) show up and compile fine.</p>