title: Springboot - Can i use Jetty with SL4J
body: <p>I'm working on a SpringBoot - Kotlin - Gradle project and I seem to have run into logger conflicts.  I'm using a library that includes<code>slf4j</code> - and thus on startup I'm given the wonderful message of:</p>
  
  <blockquote>
    <p>Caused by: java.lang.IllegalArgumentException: LoggerFactory is not a Logback LoggerContext but Logback is on the classpath. Either remove Logback or the competing implementation (class org.slf4j.impl.Log4jLoggerFactory loaded from file:/Users/USERNAME/.gradle/caches/modules-2/files-2.1/org.slf4j/slf4j-log4j12/1.7.25/110cefe2df103412849d72ef7a67e4e91e4266b4/slf4j-log4j12-1.7.25.jar). If you are using WebLogic you will need to add 'org.slf4j' to prefer-application-packages in WEB-INF/weblogic.xml: org.slf4j.impl.Log4jLoggerFactory</p>
  </blockquote>
  
  <p>Adding these lines to my <code>build.gradle</code> file allows me to run: </p>
  
  <pre><code>configurations {
      providedRuntime
      compile.exclude(group: 'ch.qos.logback')
  }
  </code></pre>
  
  <p>However my application now starts up with <strong>Tomcat</strong> now instead of <strong>Jetty</strong>.  </p>
  
  <p>My dependency block is:</p>
  
  <pre><code>dependencies {
      compile('org.springframework.boot:spring-boot-starter')
      compile("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
      compile("org.jetbrains.kotlin:kotlin-reflect")
      compile 'org.springframework.boot:spring-boot-starter-web'
      runtime('org.springframework.boot:spring-boot-devtools')
      testCompile('org.springframework.boot:spring-boot-starter-test')
  
  
      //SpringFox
      compile group: 'io.springfox', name: 'springfox-swagger2', version: '2.8.0'
      compile group: 'io.springfox', name: 'springfox-swagger-ui', version: '2.8.0'
      compile group: 'io.springfox', name: 'springfox-spring-web', version: '2.8.0'
  
      // SDDF
      compile "org.mitre.sddf:sddf:15.3.2"
  }
  </code></pre>
  
  <p>Is there an easy way to resolve this issue and still be able to use <strong>Jetty</strong>?</p>
  
  <p><em>Can I put something in my <code>applicaiton.yml</code> or <code>applictaion.properties</code>?</em></p>